在测试执行Maven surefire插件时排除日志跟踪

时间:2019-06-20 15:48:00

标签: maven maven-plugin maven-surefire-plugin

我的maven项目在构建应用程序时执行maven-surefire-plugin v2.22.0 TEST。默认情况下,surefire执行的日志级别为INFO,并且该插件使用[org.apache.logging.slf4j.Log4jLoggerFactory]。

我不希望我的构建过程在执行时记录这些跟踪:maven-surefire-plugin:2.22.0:test(默认测试)

请任何人帮助您跳过此插件执行的登录记录?

<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<version>2.22.0</version>

我尝试了排除和verbose = false,但没有运气:(

1 个答案:

答案 0 :(得分:0)

log4j.properties下放置src/test/resources,内容如下:

log4j.rootLogger=OFF