Disable maven boot progress indication

In our company, on CI maven machines, the local repository is cleaned before each build. As a result, my build logs always have a bunch of noise like this

Downloading: http://.../artifactory/repo/com/codahale/metrics/metrics-core/3.0.1/metrics-core-3.0.1.jar 4/2122 KB 8/2122 KB 12/2122 KB 16/2122 KB 18/2122 KB 18/2122 KB 4/480 KB 18/2122 KB 8/480 KB 18/2122 KB 12/480 KB 18/2122 KB 16/480 KB 18/2122 KB 16/480 KB 4/1181 KB 18/2122 KB 16/480 KB 8/1181 KB 18/2122 KB 16/480 KB 12/1181 KB 

Is there an option I to disable the download progress indication?

+124
maven
Feb 07 '14 at 22:09
source share
3 answers

mvn -B.. or mvn --Batch-mode...

Refresh

+173
Feb 07 '14 at 22:19
source share

First of all, as khmarbaise already answered, you should use mvn -B to enable batch mode.

If you also want to get rid of the "Download / Download" lines, you can set the corresponding logger org.apache.maven.cli.transfer.Slf4jMavenTransferListener to a level higher than the information. Therefore, I used the org.slf4j.simpleLogger.log property, as described here .

Using only the command line, you can do this:

 mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B ... 

Or you can use the environment variable MAVEN_OPTS , as described here :

 export MAVEN_OPTS=-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn 

Note: As far as I know, this only works for maven 3.1 and above.

+58
Feb 26 '16 at 13:48
source share

Starting with Maven 3.6.1, Maven now has the ability to suppress the transfer process when loading / unloading interactively.

mvn --no-transfer-progress....

or in short:

mvn -ntp.......

A full release note can be found here: http://maven.apache.org/docs/3.6.1/release-notes.html

0
Apr 21 '19 at 9:22
source share



All Articles