gnodet commented on issue #315:
URL: 
https://github.com/apache/maven-clean-plugin/issues/315#issuecomment-5848166974

   I've opened a draft PR implementing a `purge-check` goal that addresses 
this: https://github.com/apache/maven-clean-plugin/pull/356
   
   **Approach:** rather than maintaining a build-state database, the goal uses 
a simple heuristic — a direct child directory of `basedir` is considered 
orphaned when its **only non-hidden child is `target/`**. A live sub-project 
always has at least a `pom.xml` alongside its build directory, so this is a 
reliable signal.
   
   **Lifecycle integration:** the goal is designed to be bound to `initialize` 
in Maven core 4.1.0, so it would run automatically on every build (not just 
`mvn clean`), covering the `git pull --rebase && mvn install` scenario too. The 
PR only adds the goal; the binding in maven-core will come separately.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to