Maven Failed to execute goal xxx:xxx(xxx) on project xxx: There are test failure问题解决

àì夳堔傛蜴生んèń 2023-10-07 17:25 177阅读 0赞

问题描述:

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project easyexceltest: There are test failures.

Please refer to E:\idea\easyexceltest\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.

问题分析:

1、项目引入了junit依赖,导致Maven在进行package操作时保错。

解决办法:

指定maven-surefire-plugin插件的skipTests为true即可。

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

2、使用了Plugins的install导致报错。

watermark_type_ZHJvaWRzYW5zZmFsbGJhY2s_shadow_50_text_Q1NETiBA5pet5Lic5oCq_size_17_color_FFFFFF_t_70_g_se_x_16

解决办法:

使用Lifecycle的install。

watermark_type_ZHJvaWRzYW5zZmFsbGJhY2s_shadow_50_text_Q1NETiBA5pet5Lic5oCq_size_16_color_FFFFFF_t_70_g_se_x_16

发表评论

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

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

相关阅读