maven打包出错:
再进行项目打包的时候出现以下错误:
There are test failures.
Please refer to F:\code\study\wxpay-demo\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:
在pom文件添加以下配置,打包跳过测试:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
打包成功
解决方案2:
通过idea设置maven打包跳过测试
点击小图标会发现test变灰,再进行打包就可以了