1. 忽略单元测试失败
...
< plugin >
< groupId > org.apache.maven.plugins </ groupId >
< artifactId > maven-surefire-plugin </ artifactId >
< configuration >
< testFailureIgnore > true </ testFailureIgnore >
</ configuration >
</ plugin >
...
或者命令:
mvn package -Dmaven.test.failure.ignore=true
2. 跳过单元测试
...
< plugin >
< groupId > org.apache.maven.plugins </ groupId >
< artifactId > maven-surefire-plugin </ artifactId >
< configuration >
< skip > true </ skip >
</ configuration >
</ plugin >
...
或者命令:
mvn -package -Dmaven.test.skip=true