Maven 2 & 3

More control over what WARNING messages are displayed

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0.4
  • Fix Version/s: 2.0.6
  • Component/s: Logging
  • Labels:
    None
  • Complexity:
    Intermediate
  • Number of attachments :
    0

Description

It would really be nice if there was more control over what WARNING messages that Maven spits out by default. When building off of a clean repo, a bunch of {{[WARNING] Unable to get resource ...}} messages litter the console output... which really makes it hard to see what is actually going on.

I'd like mvn to not show those by default, and have a flag to enable them if needed... kinda like the -W flag on gcc.

IMO these WARNING messages are only useful about 5% of the time when strange dependency problems pop up... it would be better IMO if for the remaining 95% that mvn didn't complain so much about stuff that is not really a problem.

Issue Links

Activity

Hide
Jason Dillon added a comment -

The biggest offender I know of is:

Downloading: http://ws.zones.apache.org/repository2//org/apache/geronimo/genesis/config/project-config/1.1/project-config-1.1.pom
[WARNING] Unable to get resource 'org.apache.geronimo.genesis.config:project-config:pom:1.1' from repository axis2-m2-repo (http://ws.zones.apache.org/repository2/)

I put the "Downloading: ..." line in here too, since they seem to go hand in hand. Would be nice to only show "Downloading: ..." when its actually there to download, else log a DEBUG about "Attempting to download: ..."

This one does not show up much, but more often than not its not a problem:

[WARNING] Unable to load parent project from repository: Could not find the model file '/Users/jason/ws/geronimo/server/../pom.xml'.

This is a lame duck warning (should not log this, since the expected prefix matches what's there)

[WARNING] Goal prefix is: geronimo; Maven currently expects it to be geronimo

Some places the ^^^ warning actually shows a problem, though with all the "Unable to get resource" I tend to miss them.

And then a few of these:

[WARNING]
    Artifact org.apache.xbean:xbean-finder:jar:2.8:runtime retains local scope 'runtime' overriding broader scope 'compile' 
    given by a dependency. If this is not intended, modify or remove the local scope.

I've yet to run into a situation where I wanted to change the scope based on this message, usually the scope was correct. So its a little bit more noise to sort though.

But, the biggest one is the first... I have ~2k of these messages in a Geronimo server build. If nothing else I'd like to see that log become a DEBUG message. And the WARNING about the plugin prefix should be removed unless the prefix configured doesn't actually match what is expected.

Show
Jason Dillon added a comment - The biggest offender I know of is:
Downloading: http://ws.zones.apache.org/repository2//org/apache/geronimo/genesis/config/project-config/1.1/project-config-1.1.pom
[WARNING] Unable to get resource 'org.apache.geronimo.genesis.config:project-config:pom:1.1' from repository axis2-m2-repo (http://ws.zones.apache.org/repository2/)
I put the "Downloading: ..." line in here too, since they seem to go hand in hand. Would be nice to only show "Downloading: ..." when its actually there to download, else log a DEBUG about "Attempting to download: ..." This one does not show up much, but more often than not its not a problem:
[WARNING] Unable to load parent project from repository: Could not find the model file '/Users/jason/ws/geronimo/server/../pom.xml'.
This is a lame duck warning (should not log this, since the expected prefix matches what's there)
[WARNING] Goal prefix is: geronimo; Maven currently expects it to be geronimo
Some places the ^^^ warning actually shows a problem, though with all the "Unable to get resource" I tend to miss them. And then a few of these:
[WARNING]
    Artifact org.apache.xbean:xbean-finder:jar:2.8:runtime retains local scope 'runtime' overriding broader scope 'compile' 
    given by a dependency. If this is not intended, modify or remove the local scope.
I've yet to run into a situation where I wanted to change the scope based on this message, usually the scope was correct. So its a little bit more noise to sort though. But, the biggest one is the first... I have ~2k of these messages in a Geronimo server build. If nothing else I'd like to see that log become a DEBUG message. And the WARNING about the plugin prefix should be removed unless the prefix configured doesn't actually match what is expected.
Hide
Barrie Treloar added a comment -

It would be handy to have the context in the output for development purposes so you can track down the class and module that is outputting the log.
The equivalent of %c in log4j.

If this was also configurable....

Show
Barrie Treloar added a comment - It would be handy to have the context in the output for development purposes so you can track down the class and module that is outputting the log. The equivalent of %c in log4j. If this was also configurable....
Hide
Jason van Zyl added a comment -

The message that are in the core itself I moved to debug. One of those is in the plugin api and one in the site plugin.

Show
Jason van Zyl added a comment - The message that are in the core itself I moved to debug. One of those is in the plugin api and one in the site plugin.

People

Vote (6)
Watch (4)

Dates

  • Created:
    Updated:
    Resolved: