maven打包时跳过测试

运行mvn install时跳过Test

 

方法一:

[html]  view plain  copy
 print ?
  1. <project>  
  2.   [...]  
  3.   <build>  
  4.     <plugins>  
  5.       <plugin>  
  6.         <groupId>org.apache.maven.pluginsgroupId>  
  7.         <artifactId>maven-surefire-pluginartifactId>  
  8.         <version>2.18.1version>  
  9.         <configuration>  
  10.           <skipTests>trueskipTests>  
  11.         configuration>  
  12.       plugin>  
  13.     plugins>  
  14.   build>  
  15.   [...]  
  16. project>  


方法二:

mvn install -DskipTests

或者

mvn install -Dmaven.test.skip=true

http://blog.csdn.net/thc1987/article/details/42458895

你可能感兴趣的:(Maven)