关于maven:mavensurefireplugin-SurefirePlugin-not-present

8次阅读

共计 478 个字符,预计需要花费 2 分钟才能阅读完成。

报错信息:

[INFO] — maven-surefire-plugin:2.12.4:test (default-test) @ cm-common —

[WARNING] Error injecting: org.apache.maven.plugin.surefire.SurefirePlugin

java.lang.TypeNotPresentException: Type org.apache.maven.plugin.surefire.SurefirePlugin not present

1. 起因

运维更改测试 maven 版本 下载的 maven-surefire-plugin 依赖包 pom 文件中没有内容

2. 解决方案

1) 手动指定可用 maven-surefire-plugin 版本

`<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7.2</version>
</plugin>
`

2) Maven 版本回退 保障统一

正文完
 0