Brian Tarbox
Brian Tarbox

Reputation: 2375

maven outputting lots of "FINE" log messages, how do I stop it?

When I run maven I get output as if I had specified logging level FINE which makes it very hard to find the actual output. I also get hundreds of lines listing the explicit and implicit bindings. As far as I can tell I've not configured mvn at all. I'm running from within a cygwin shell.

Here is a sample that also gives info about my version and such.

$ mvn --show-version
Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)
Maven home: C:\apache-maven-3.0.4
Java version: 1.6.0_31, vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jdk1.6.0_31\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Module execution: 344ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: TypeListeners & ProvisionListener creation: 6ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Scopes creation: 4ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Converters creation: 1ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Binding creation: 23ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Private environment creation: 1ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Injector construction: 0ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Binding initialization: 20ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Binding indexing: 1ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Collecting injection requests: 0ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Binding validation: 1ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Static validation: 0ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Instance member validation: 5ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Provider verification: 2ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Static member injection: 0ms
Jan 23, 2013 3:33:03 PM org.sonatype.guice.bean.reflect.Logs$JULSink debug
FINE: Add publisher: com.google.inject.internal.InjectorImpl@561777b1

-----[explicit bindings]-------------------------------------------------------
0. ProviderInstanceBinding{key=Key[type=com.google.inject.Injector, annotation=[none]], source=[unknown source], scope=Scopes.NO_SCOPE, provider=Provider<Injector>}
1. ProviderInstanceBinding{key=Key[type=java.util.logging.Logger, annotation=[none]], source=[unknown source], scope=Scopes.NO_SCOPE, provider=Provider<Logger>}
2. InstanceBinding{key=Key[type=com.google.inject.Stage, annotation=[none]], source=[unknown source], instance=DEVELOPMENT}
.
.
.
194. ConstructorBinding{key=Key[type=org.apache.maven.lifecycle.internal.ThreadConfigurationService, annotation=[none]], source=ClassRealm[plexus.core, parent: null], scope=Scopes.SINGLETON}
195. ConstructorBinding{key=Key[type=org.apache.maven.lifecycle.internal.MojoExecutor, annotation=[none]], source=ClassRealm[plexus.core, parent: null], scope=Scopes.SINGLETON}
196. ConstructorBinding{key=Key[type=org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder, annotation=[none]], source=ClassRealm[plexus.core, parent: null], scope=Scopes.SINGLETON}
197. ConstructorBinding{key=Key[type=org.apache.maven.lifecycle.Lifecycle, annotation=[none]], source=ClassRealm[plexus.core, parent: null], scope=Scopes.SINGLETON}

Upvotes: 2

Views: 592

Answers (4)

eis
eis

Reputation: 53563

Can you check for a file JDK_HOME/jre/lib/logging.properties under your JDK folder? guice within maven uses java.util.logging, and if you have file like that specified, it can turn on logger or loggers using java.util.logging.

Upvotes: 2

Brian Tarbox
Brian Tarbox

Reputation: 2375

The answer was that my JAVA_HOME was pointing at a JDK installation rather than a JRE install...which makes no sense to me but it now works.

I edited the mvn command script to echo where it was running java from. When running from .../Java/jdk1.6.0_31/bin I would get all of these errors but when running from .../Java/jre6/bin I would not.

I guess the jdk assuming more debugging...or something? I've never seen behavior like this before.

Upvotes: 1

EdH
EdH

Reputation: 5003

It looks more like log output than anything generated by Maven. Looking at the source code for the Stopwatch class, it's using Java Util Logging. Have you set the default logging properties to include the FINE level of output? This could be in the JAVA_HOME itself.

But, this is more how you have logging configured than anything Maven's doing

Upvotes: 3

Robert Munteanu
Robert Munteanu

Reputation: 68328

Since --show-version is documented to

Display version information WITHOUT stopping build

I believe that this information somehow comes from a pom.xml file, a misconfigured settings.xml file or a debug setting places inside MAVEN_HOME.

Upvotes: 0

Related Questions