jenkins编译项目报错Failed to execute goal org.apache.maven.plugins
错误信息[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project project_name: There are test failures.[ERROR][ERROR] Please refer to /root/....
·
错误信息
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project project_name: There are test failures.
[ERROR]
[ERROR] Please refer to /root/.jenkins/workspace/manage/target/surefire-reports for the individual test results.
原因
此错误出现的原因一般是测试类和maven-surefire-plugin
插件有冲突,也有可能是jar包的依赖问题,不影响我们项目的正常编译,在pom.xml
中插入跳过测试的信息即可正常编译。
解决方法
在项目中的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>
更多推荐
已为社区贡献1条内容
所有评论(0)