Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test
I had similar issue, I was able to solve it using -U option along with mvn command as
mvn clean install -U
This worked for me, hope it helps.
You're probably missing some dependencies.
Locate the dependencies you're missing with mvn dependency:tree
, then install them manually, and build your project with the -o
(offline) option.
I had a similar problem but all answers here didn't help me.
For me the problem was a failing test. If you are doing test driven development, then a failing or not implemented test shouldn't break the build. I still want my project to build.
To solve this, I added a configuration to surefire so that it ignores a failing test.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
This error occurs if some unit test cases are failing.
In my application, certain unit tests were not compatible with Java 8 so they were failing. My error was resolved after changing jdk1.8.0_92
to jdk1.7.0_80
.
The build would succeed with mvn clean install -DskipTests
but this will skip the unit tests. So just ensure that you run then separately after the build is complete.