解决:target\surefire-reports for the individual test results

比眉伴天荒 2023-01-19 13:50 115阅读 0赞

错误:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project web_nanchang: There are test failures.

[ERROR]

[ERROR] Please refer to E:\maven\web_nanchang\target\surefire-reports for the individual test results.

解决方法:

这是因为测试代码时遇到错误,它会停止编译。只需要在pom.xml的里添加以下配置,使得测试出错不影响项目的编译。

  1. <build>
  2. <plugins>
  3. <plugin>
  4. <groupId>org.apache.maven.plugins</groupId>
  5. <artifactId>maven-surefire-plugin</artifactId>
  6. <configuration>
  7. <testFailureIgnore>true</testFailureIgnore>
  8. </configuration>
  9. </plugin>
  10. </plugins>
  11. </build>

发表评论

表情:
评论列表 (有 0 条评论,115人围观)

还没有评论,来说两句吧...

相关阅读