【发布时间】:2017-01-14 03:39:47
【问题描述】:
我正在遵循以下说明: http://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html
我在我的pom.xml 中使用了排除,但它似乎不起作用。
这里是sn-p:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<argLine>${surefireArgLine}</argLine>
<excludes>
<exclude>${project.basedir}Test1.java</exclude>
</excludes>
</configuration>
</plugin>
【问题讨论】:
-
当我用 mvn clean install 调用 mvn - 我必须给它一个特定的参数来包含“排除”吗?
-
您是要排除所有测试还是仅排除文件名与某些正则表达式匹配的测试?
标签: java maven junit pom.xml maven-surefire-plugin