[转]maven打包报错:Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test

Posted 狂歌net世界

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[转]maven打包报错:Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test相关的知识,希望对你有一定的参考价值。

源文URL:http://blog.csdn.net/caiwenfeng_for_23/article/details/44514947

 

mvn compile  没有问题,mvn package的时候报如下错误:

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test 

 

 

解决方法:

 

打包跳过测试有两种方法


一是命令行,
mvn clean package -Dmaven.test.skip=true


二是写入pom文件,
<plugin>  
        <groupId>org.apache.maven.plugins</groupId>  
        <artifactId>maven-surefire-plugin</artifactId>  
        <version>2.4.2</version>  
        <configuration>  
          <skipTests>true</skipTests>  
        </configuration>  
</plugin>  

 

以上是关于[转]maven打包报错:Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test的主要内容,如果未能解决你的问题,请参考以下文章

maven打包出错: Failed to clean project: Failed to delete

Maven打包test报错Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin

Springboot项目Maven打包报错:Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:r

git 打包报错:Maven Build时提示:Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4

maven打包报错Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.5.2.RELEASE:repa

maven打包报错Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.5.2.RELEASE:repa