今天导入项目后遇到了这个问题:idea使用maven install报错maven Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on project web_nanchang: There are test failures.
查询了下解决方法,以下解决方法转自博主:风撩起你的发梢
[https://blog.csdn.net/tokyo__hot/article/details/85554376]
出现上述错误有2种解决方式:
1.当前模块的test包下的某个test类没有test方法,可以加上@Ignore注解
2.在当前模块的pom.xml文件中加上如下内容即可解决
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.21.0</version>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
</plugins>
</build>
亲测有效!!!