slachiewicz commented on issue #1732:
URL: 
https://github.com/apache/maven-dependency-plugin/issues/1732#issuecomment-7070029592

   I took a closer pass over this issue, #1643 and PR #1798. Here is the impact 
as I see it, plus a recommendation.
   
   ## What `silent` actually does today
   
   - `silent` is declared on `AbstractDependencyMojo`, so every goal inherits 
it.
   - `setSilent(true)` replaces the mojo `Log` with `DependencySilentLog`, 
whose methods are all no-ops. It therefore suppresses INFO **and** WARN/ERROR 
on every goal, not just the per-artifact copy lines.
   - The only code that reads the flag is `GoOfflineMojo.logMessage()`, which 
chooses INFO vs DEBUG for the "Resolved plugin / dependency / annotation 
processor path" lines. Per-artifact copy and unpack lines have been debug-only 
since 3.8.1 (copy) and 3.11.0 (unpack, #1624), so `silent` no longer affects 
those.
   
   ## Impact of removing it in 3.13.0
   
   1. Builds that still set `<silent>true</silent>` get Maven's "Parameter 
'silent' is unknown" warning and keep building; `-Dsilent=true` becomes a 
no-op. That was verified on 3.9.16, 3.10.0 and 4.0.0-rc-7. It has not been 
checked with `-Dmaven.plugin.validation=STRICT`, so that is worth confirming 
before release.
   2. Those builds will start seeing output `silent` used to hide: notably `X 
already exists in destination.` at INFO from 
`copy-dependencies`/`unpack-dependencies`, and `Overwriting …` at WARN from 
`copy`/`copy-dependencies`. This is the case walterlaan reported in #1643 after 
it was closed, so the issue text should say it explicitly: the parameter is not 
entirely useless, it just no longer controls the lines it was introduced for.
   3. `go-offline` default output becomes quieter for everyone, since its 
resolved lines move from INFO to DEBUG. That is deliberate and consistent with 
copy/unpack, but it is a separate behavior change bundled into this removal and 
should be called out in the 3.13.0 release notes.
   4. This is an API break: public `setSilent(boolean)`, protected final 
`isSilent()` and public `DependencySilentLog` all disappear. Maven plugins do 
not promise binary compatibility across minors, and the deprecation warning 
plus the `removed` label cover the process side, but reviewers should accept 
the break explicitly. Note also that the original deprecation said "to be 
removed in 4.0"; #1733 changed that to 3.13.0, so some users may not expect 
removal this early.
   5. Small doc nit: the deprecation text says "since 3.8.1 the copy and unpack 
goals log each artifact at debug level". Unpack only moved to debug in 3.11.0 
via #1624. If this issue is the canonical record, the wording should be 
corrected here.
   
   ## Assessment of PR #1798
   
   The patch is complete and internally consistent: the field, accessors and 
logger are deleted; all five `go-offline` messages are logged unconditionally 
at DEBUG; both `go-offline` IT verification scripts are updated; dead tests and 
the last `<silent>` in a test resource are removed. There are no remaining 
`silent` references in the tree. The other go-offline ITs use level-agnostic 
`contains('Resolved …')` assertions and keep passing. Two things to verify 
before merge: CI must run ITs with debug logging, since the new assertions 
depend on `[DEBUG]` lines; and I would narrow `assert 
!buildLog.contains('[INFO] Resolved')` to the specific messages so an unrelated 
future line cannot trip it.
   
   ## Recommendation
   
   Keep #1798 in draft until **3.12.0 is released**. Then mark it ready for 
review, keep the `removed` label, set the 3.13.0 milestone and merge. I would 
also add a short note here about the restored INFO/WARN lines, and consider a 
separate follow-up to demote `already exists in destination` and `Overwriting 
…` to DEBUG if that noise matters — but that should not block this cleanup.
   


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