前言
今天通过Idea 打包时报如下错
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project multidataids: There are test failures.
如图
解决办法
既不是JDK问题也不是版本问题,在参考了maven打包时跳过测试中根据文章提示
在pom.xml最下面添加配置就好了,
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
(我觉得这个不是最终解决办法,只是逃避方法,如果构建时候前提需要测试通过,怎么解决呢,有人解决的话希望回帖,谢谢)