Only log dependency classpath when no property/file output is specified #1551
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When invoking the
build-classpathmojo withoutputPropertybut withoutoutputFile, it logs the complete classpath atINFOto the build log. In our case that produces an enormously long log message.Interestingly this is not the case when the
outputFileis set. This seems to be quite arbitrary.After doing some code archaeology, I think this behavior was never intended to work this way:
outputFileproperty. So the user had the choice: Either set theoutputFileproperty or have the classpath logged as INFO.outputPropertyparameter was added: deec581. This retained the original behavior: If neitheroutputPropertynoroutputFilewas set, the classpath would be logged at INFO.outputPropertyandoutputFileto be specified at the same time: 96ad4a0. 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
outputPropertynoroutputFileis 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
you have to acknowledge this by using the following check-box.