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包,项目构建成功。

  

posted @ 2018-04-19 17:54  Marydon  阅读(5596)  评论(0编辑  收藏  举报