问题描述
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project fruit: There are test failures.
Please refer to xxx\fruit\target\surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
原因
- 这是因为测试代码时遇到错误,它会停止编译。
解决
https://wwwblogs/qyf404/p/5013694.html
pom.xml
添加下面代码:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
</plugins>
</build>
其他
百度上有人这样说,但我编译不通过,其他人可以试试
pom.xml
文件的Junit
版本不对,或者其他原因(将junit依赖注释掉,编译通过)
更多推荐
Maven-Please refer to xxx\target\surefire-reports for the individual test resu
发布评论