0
点赞
收藏
分享

微信扫一扫

maven install时报错Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test

hwwjian 2023-03-25 阅读 68


maven install时

maven install时报错Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test_apache

有两种解决办法:

1.maven命令行   mvn clean package -Dmaven.test.skip=true

 注意下路径就可以,如果是idea,那就更方便,

maven install时报错Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test_apache_02

直接在这里输入mvn clean package -Dmaven.test.skip=true就可以了,如果是cmd,需要到项目的pom.xml,

maven install时报错Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test_apache_03

maven install时报错Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test_apache_04

,然后输入mvn clean package -Dmaven.test.skip=true即可.

2.第二种是更改pom.xml,建议第一种,方便


<plugins>
 
<plugin>          <groupId>org.apache.maven.plugins</groupId>  
        <artifactId>maven-surefire-plugin</artifactId>  
        <version>2.4.2</version>  
        <configuration>  
          <skipTests>true</skipTests>  
        </configuration>  
    </plugin>  



  </plugins>


注意下位置,别放错了地方就好.以上两种我都测试过,可以解决

举报

相关推荐

0 条评论