I have similiar problem that was here maven-surefire-plugin missing in eclipse
But I did what was in answer of that question and still my build fails with the same error.
MCVE
here: https://github.com/yami12376/AspectJ
When i build i get:
[WARNING] Error injecting: org.apache.maven.plugin.surefire.SurefirePlugin
java.lang.TypeNotPresentException: Type org.apache.maven.plugin.surefire.SurefirePlugin not present
at
...
org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
... 57 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.216 s
[INFO] Finished at: 2017-04-06T18:12:01+02:00
[INFO] Final Memory: 13M/244M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project NumberGenerator: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: Unable to load the mojo 'test' in the plugin 'org.apache.maven.plugins:maven-surefire-plugin:2.12.4'. A required class is missing: org/apache/maven/plugin/surefire/SurefireReportParameters
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.apache.maven.plugins:maven-surefire-plugin:2.12.4
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/apache-maven-3.3.9/repositoryNewNexus/org/apache/maven/plugins/maven-surefire-plugin/2.12.4/maven-surefire-plugin-2.12.4.jar
[ERROR] urls[1] = file:/C:/apache-maven-3.3.9/repositoryNewNexus/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: org.apache.maven.plugin.surefire.SurefireReportParameters
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
add following code into POM.xml, and update maven project.
<project>
[...]
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
</plugin>
</plugins>
</build>
[...]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With