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

Posted Marydon

tags:

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

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

CreateTime--2018年4月19日17:40:06

Author:Marydon

1.异常明细:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) 

表示的含义是:maven在打war包时,运行测试类时报错。

2.解决方案:

  设置maven在打war包时,跳过对测试类的执行步骤

<!-- 跳过对测试类代码的执行 -->
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.4.2</version>
    <configuration>
        <skipTests>true</skipTests>
    </configuration>
</plugin>

3.测试

  重新打war包,项目构建成功。

  

以上是关于maven Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4的主要内容,如果未能解决你的问题,请参考以下文章

IDEA报错Failed to execute goal

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile

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

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:create (default-c

Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.1.0

Maven - Failed to execute goal org.apache.maven.plugins:maven-clean-plugin