gnodet-bot commented on code in PR #355:
URL: 
https://github.com/apache/maven-clean-plugin/pull/355#discussion_r4120797117


##########
src/main/java/org/apache/maven/plugins/clean/CleanMojo.java:
##########
@@ -274,6 +273,12 @@ public void execute() {
         Cleaner cleaner =
                 new Cleaner(matcherFactory, logger, isVerbose(), 
followSymLinks, force, failOnError, retryOnError);
         if (fast && session != null) {
+            if (failOnError) {
+                logger.warn("Fast clean is enabled with failOnError=true (the 
default): file deletion will run"
+                        + " synchronously in the calling thread so that errors 
can fail the build immediately."
+                        + " To enable fully asynchronous deletion, set 
failOnError=false"
+                        + " (errors will then be reported as warnings at 
session end).");
+            }

Review Comment:
   ⚠️ **Warning-level log on every default build is too noisy.**
   
   `failOnError=true` is the default, `fast=true` is the recommended mode — 
this warning fires on **every single build** that uses fast clean without 
explicit `failOnError=false`. That's not an exceptional condition; it's the 
expected default configuration.
   
   Concerns:
   - Users who intentionally want the default behaviour get an undismissable 
warning on every build
   - The message reads like a suggestion to change config ("set 
failOnError=false"), which is misleading — the default should be the safe 
choice, not something that generates warnings
   - This will generate noise in CI logs and likely trigger user reports
   
   Options:
   1. **Remove the warning entirely** — the Javadoc on `fast` and `failOnError` 
already documents the interaction. Users who read the docs know what they're 
getting.
   2. **Downgrade to `debug`** — visible with `-X` for troubleshooting, silent 
otherwise.
   3. **Log `info` once per session** (not per module) — if you want 
visibility, guard it with a session-scoped flag so multi-module builds don't 
repeat it N times.
   
   Option 2 or 3 would be my recommendation. A `warn` on the default config 
path is a code smell.



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