Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project 02-springboot-jbaby: There are test failures.
在idea中如果在install打包的时候,遇见以上的问题。
解决方法:在pom.xml文件中添加一下插件:
<!--打jar包,因为test错误不能运行导入的插件-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.2</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
成功截图如下图:
如何找到idea中所打的jar包?
在你的pom.xml上。看你的…t,我的如下
<groupId>com.example.springboot</groupId>
<artifactId>02-springboot-jbaby</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>02-springboot-jbaby</name>
然后在你的repository中根据pom文件里的…去查找,这里我的是com.example.springboot。
具体如下图所示: