maven跳过Test进行打包

maven跳过Test进行打包

默认跳过Test的配置:
<project>
[…]
<properties>
<skipTests>true</skipTests>
</prop…

默认跳过Test的配置:

<project>
[...]
<properties>
<skipTests>true</skipTests>
</properties>
[...]
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M1</version>
<configuration>
<skipTests>${skipTests}</skipTests>
</configuration>
</plugin>
</plugins>
</build>
[...]
</project>

直接 mvn install
如果不想跳过Test:
mvn install -DskipTests=false

http://maven.apache.org/surefire/maven-surefire-plugin/examples/skipping-tests.html

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×