Maven报错,surefire插件找不到了

本文最后更新于:3 年前

fatalitePID61597814by212a.jpg

项目报错,解决后,记录一下o_O

报错信息:

1
2
3
4
5
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project weixinapp: There are test failures.

Please refer to F:\Java\project\bookshelf\bookshelf_back\weixinapp\target\surefire-reports for the ndividual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.

![image-20210520151108369](C:\Users\Sept Zhang\AppData\Roaming\Typora\typora-user-images\image-20210520151108369.png)

方法:

1.插入到<plugins>

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

2刷新Maven,运行项目测试