gnodet opened a new issue, #13563:
URL: https://github.com/apache/maven/issues/13563

   ## Problem
   
   PR #12698 introduces `--warning-mode` with four options: `summary`, `all`, 
`none`, `fail`.
   However, `summary` and `all` are **functionally identical** — no mechanism 
exists to
   suppress inline WARN-level log output in summary mode.
   
   Gradle's `--warning-mode=summary` actually suppresses inline warnings by 
routing them
   through a `DeprecationLogger` service that buffers instead of printing. 
Maven's
   implementation lacks this control point.
   
   ## Expected behavior
   
   - `--warning-mode=all` — warnings appear inline AND in the end-of-build 
summary
   - `--warning-mode=summary` — warnings are **suppressed inline**, only shown 
in the
     end-of-build summary (deduplicated, with counts)
   
   ## Proposed fix
   
   1. In summary mode, `DiagnosticCollector.report()` should buffer the problem 
and
      **not** emit the corresponding log call
   2. For legacy plugins calling `getLog().warn()`, the `DefaultLog` 
implementation
      should check the active warning mode before delegating to SLF4J
   3. For auto-captured WARN events (via `MavenSimpleLogger`), the log sink 
should
      check warning mode and suppress console output while still recording in 
the
      build report
   
   **Alternative:** Don't ship `--warning-mode=summary` until suppression works.
   Ship only `all`/`none`/`fail` in the first cut, add `summary` when the 
mechanism
   is ready.
   
   ## Related
   
   - #12698 — Warning mode PR
   - #12571 — Build output overhaul tracking issue
   
   <!-- AI-Agent-Disclosure -->
   > 🤖 Drafted with Claude Code (Claude Opus 4.6). Reviewed and confirmed by 
@gnodet before submission.


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