(转)maven打包时跳过测试

 运行mvn install时跳过Test

1.1 方法一

复制代码
<project>  
  [...]  
  <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> 
复制代码

1.2 方法二

mvn install -DskipTests

1.3 方法三

mvn install -Dmaven.test.skip=true

 详情参考http://maven.apache.org/surefire/maven-surefire-plugin/examples/skipping-test.html

posted @ 2018-04-14 23:03  sandea  阅读(155)  评论(0编辑  收藏  举报