gnodet commented on PR #354: URL: https://github.com/apache/maven-clean-plugin/pull/354#issuecomment-5860378150
Closing after further analysis. The age-filter approach is technically sound for the narrow race it targets, but after reflection the scenario it protects against doesn't have observable consequences in practice. **Why the race is a no-op:** Leftover directories, by definition, belong to a dead build — the process that created them is gone. Whether the *current* session's leftover scan deletes them, or a *concurrent* session's leftover scan deletes them 30 seconds earlier, the outcome is identical: the leftovers get cleaned up. No live build is using them. **The real concurrent-build problem is elsewhere:** If two `mvn clean install` sessions run concurrently on the same project tree, the destructive issue is `CleanMojo` wiping `target/` directories that the other session is actively building into — not the leftover scan. That's a Maven-level problem (no session-level locking on project directories) that the clean plugin cannot solve. So this PR fixes a race with no real-world failure mode, while the actual concurrent-build hazard remains. Not worth the added complexity. -- 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]
