arturobernalg opened a new pull request, #474: URL: https://github.com/apache/maven-wrapper/pull/474
`-q`/`--quiet` had no effect on the wrapper itself (e.g. `DefaultDownloader`'s "insecure connection" warning) — `Logger.warn()` always wrote to stderr unconditionally, because `MavenWrapperMain` never looked at its own forwarded arguments before printing anything, only Maven does once it starts. Added `MavenWrapperMain.isQuiet(args)`, a plain scan for `-q`/`--quiet` matching Maven's own CLI, called at the very start of `main()` to set a new `Logger.setQuiet()` flag; `Logger.warn()` now skips printing when it's set, mirroring Maven's own `-q` behavior of showing only errors. Added `MavenWrapperMainTest` for the flag detection and `LoggerTest` for the suppression behavior. Verified by reverting the fix locally and confirming the new tests fail to compile against the old `Logger`/`MavenWrapperMain` API, then restoring it and confirming everything passes again. Full module test suite, checkstyle and spotless all green. --- To make clear that you license your contribution under the Apache License Version 2.0, January 2004, check one of the following: - [x] I hereby declare this contribution to be licensed under the Apache License Version 2.0, January 2004 - [x] I hereby declare that I have filed an Apache Individual Contributor License Agreement. -- 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]
