在具体项目,步骤需要跳过假设检验,应采取skipTests此属性设置为true.
<pre name="code" class="html"><project> [...] <!--http://blog.csdn.net/redstarofsleep--> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.18.1</version> <configuration> <skipTests>true</skipTests> </configuration> </plugin> </plugins> </build> [...] </project>
mvn install -DskipTests
mvn install -Dmaven.test.skip=true
<!--http://blog.csdn.net/redstarofsleep--> <project> [...] <properties> <skipTests>true</skipTests> </properties> [...] <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.18.1</version> <configuration> <skipTests>${skipTests}</skipTests> </configuration> </plugin> </plugins> </build> [...] </project>然后在命令行运行的时候手动开启:
mvn install -DskipTests=false
转载请注明出处:
http://blog.csdn.net/redstarofsleep
原文:http://www.cnblogs.com/mengfanrong/p/4592464.html