`

Maven下忽略或跳过单元测试配置

 
阅读更多

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
分享到:
评论
1 楼 huchiwei 2012-09-27  
能否说清楚在哪设置?谢谢!

相关推荐

Global site tag (gtag.js) - Google Analytics