具体错误信息如下:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on project cloudserver: There are test failures.
[ERROR]
[ERROR] Please refer to E:\idea-workspace\springcloud\cloudserver\target\surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
解决方法:
出现该错误是由于项目中有测试类,测试代码时遇到错误停止编译,可以通过在pom.xml文件中设置忽略错误,这样的话,就算测试出错也不会影响到项目的编译。
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
</plugins>
</build>