Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable 'downloaded' logs in Maven Invoker tests

I'd like to tune down logging during Maven Invoker tests. Right now logs are polluted with sequence of Downloading and Downloaded for every dependency in every test separately.

[INFO] [INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-grouper/2.19/surefire-grouper-2.19.jar
[INFO] [INFO] Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-grouper/2.19/surefire-grouper-2.19.jar (38 KB at 1292.5 KB/sec)

I want to preserve all other logs, so mvn -q is not an option. Also, --batch-mode hides just downloading progress, not Downloading and Downloaded logs.

like image 288
Michal Kordas Avatar asked Jan 31 '16 21:01

Michal Kordas


1 Answers

Adding

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

to MAVEN_OPTS should help with that. At least in maven 3.2.3 and 3.3.9 (those were the ones I've tested).

like image 183
Krzysztof Krasoń Avatar answered Sep 23 '22 06:09

Krzysztof Krasoń