gnodet commented on a change in pull request #6:
URL: https://github.com/apache/maven-clean-plugin/pull/6#discussion_r770937107



##########
File path: src/main/java/org/apache/maven/plugins/clean/CleanMojo.java
##########
@@ -161,6 +161,12 @@
     @Parameter( property = "maven.clean.excludeDefaultDirectories", 
defaultValue = "false" )
     private boolean excludeDefaultDirectories;
 
+    @Parameter( property = "maven.clean.fast", defaultValue = "false" )
+    private boolean fast;
+
+    @Parameter( property = "maven.clean.fastDir", defaultValue = 
"${maven.multiModuleProjectDirectory}/.mvn/clean" )

Review comment:
       I was thinking that in case the background job is not finished and if we 
restart a clean goal, we'd want to get rid of those previous unfinished 
attempts, so I'd rather keep all those "to be deleted" files under a single 
directory, so that's why I originally ruled out a simple rename. That makes the 
logic a bit more complicated.
   
   I'm currently experimenting with a way to make sure files are deleted when 
the session is ended (currently, maven exits with a `System.exit(1)` which 
cause the background thread to exit without having the time to delete the 
files.  This may make the above problem (of getting lots of "to be deleted" 
files that could not be deleted fast enough, hence a need to clean them again 
on a next run).  
   
   Ideally, I think those files should be stored in 
`${maven.multiModuleProjectDirectory}/target/.clean`.
   




-- 
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