完美解决Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2
已解决Failed to execute goal org.apache.maven.plugins2.22.2
文章目录
- 报错问题
- 解决方法
- 声明
报错问题
粉丝群里面的一个小伙伴敲代码时发生了报错(当时他心里瞬间凉了一大截,跑来找我求助,然后顺利帮助他解决了,顺便记录一下希望可以帮助到更多遇到这个bug不会解决的小伙伴),报错信息如下:
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project gulimall-coupon: There are test failures.
Please refer to D:\m1\0613\mall-coupon\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.
解决方法
解决方法如下
场景一:
如果是dubbo-3.0执行maven install失败,可以将skip_maven_deploy由false置为ture,跳过maven部署
<artifactId>dubbo-common</artifactId>
<packaging>jar</packaging>
<name>${
project.artifactId}</name>
<description>The common module of dubbo project</description>
<properties>
<skip_maven_deploy>true</skip_maven_deploy>
</properties>
场景二:
pom文件指定skipTests为true,跳过单测
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
声明
解决方法参考网络,如有侵权联系我删除
还没有评论,来说两句吧...