gnodet opened a new pull request, #362:
URL: https://github.com/apache/maven-clean-plugin/pull/362

   ## Summary
   
   Enable fast clean by default. Previously, `maven.clean.fast` defaulted to 
`false` and required explicit opt-in.
   
   ## Rationale
   
   The fast-clean mechanism works as follows:
   1. Each directory to be deleted is **atomically moved** into a staging area 
(`fastDir`, defaulting to `.mvn/target/.clean`).
   2. The actual file deletion runs in the background.
   
   The atomic move is essentially free and immediately frees the original path 
for the next build phase. If an atomic move is not supported (cross-device, 
permissions), the plugin **falls back to synchronous deletion transparently** — 
so the default change is safe for all configurations.
   
   The remaining concern — that fast-mode deletion errors go unnoticed — has 
been addressed in #355: when `failOnError=true` (the default), the deletion now 
runs synchronously in the calling thread so errors still fail the build 
immediately. When `failOnError=false`, deletion is fully async and errors are 
warnings at session end.
   
   ## Changes
   
   - `CleanMojo.fast`: `defaultValue` flipped from `"false"` to `"true"`.
   - `CleanMojo.fast` Javadoc updated to reflect the new default and remove the 
outdated caveat about small projects being slower.
   - `CleanMojo.failOnError` Javadoc updated: replaced the stale "has no effect 
in fast mode" note (superseded by #355) with the correct description of 
synchronous-vs-async behaviour.
   
   ## Migration
   
   Users who relied on traditional synchronous deletion can opt out with 
`-Dmaven.clean.fast=false` or in their POM:
   
   ```xml
   <plugin>
     <artifactId>maven-clean-plugin</artifactId>
     <configuration>
       <fast>false</fast>
     </configuration>
   </plugin>
   ```
   
   Depends on / best merged after #355.


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