解决Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test)

· JAVA笔记 maven idea配置 idea常用插件 · 7348 阅读 · 约 2 分钟

使用maven的install方法时候报错

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project

image.png

解决方法(一)

在pom.xm文件加入插件

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.4.2</version>
    <configuration>
    <skipTests>true</skipTests>
    </configuration>
</plugin>

解决方法(二)

跳过单元测试

image.png

install成功

image.png