Skip to content

Conversation

@mwalser
Copy link

@mwalser mwalser commented Nov 7, 2025

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: deec581. 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: 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 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
you have to acknowledge this by using the following check-box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant