mwalser opened a new pull request, #1551: URL: https://github.com/apache/maven-dependency-plugin/pull/1551
When invoking the `build-classpath` mojo with `outputProperty` but without `outputFile`, it logs the complete classpath at `INFO` to the build log. In our case that produces an **enormously** long log message. Interestingly this is not the case when the `outputFile` is set. This seems to be quite arbitrary. After doing some code archaeology, I think this behavior was never intended to work this way: - When the mojo was conceived, there only was the `outputFile` property. So the user had the choice: Either set the `outputFile` property or have the classpath logged as INFO. - At one point the `outputProperty` parameter was added: https://github.com/apache/maven-dependency-plugin/commit/deec581c9cb22346021b94a0e35621f6ab3ea0cc. This retained the original behavior: If neither `outputProperty` nor `outputFile` was set, the classpath would be logged at INFO. - At a later point in time, the code was changed to allow `outputProperty` and `outputFile` to be specified at the same time: https://github.com/apache/maven-dependency-plugin/commit/96ad4a0f2f1abd7be0a356d3f539c5d8530bd5d7. This change introduced the current (and in my opinion unintended) behavior. This PR fixes the issue by only logging the classpath at INFO level when neither `outputProperty` nor `outputFile` is set. This makes the behavior consistent regardless of which output method is chosen. Note: Previously we used the `<silent>true</silent>` option as a workaround. However, since this has been deprecated there is not good way of achieving a sane behaviour without completely disabling logging for a build. --- To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) you have to acknowledge this by using the following check-box. - [x] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) -- 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]
