javamavenloggingmaven-invoker-plugin

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.


Solution

  • 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).