Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest version of Maven Surefire Plugin fails #130

Open
GencoreOperative opened this issue Jan 3, 2018 · 1 comment
Open

Latest version of Maven Surefire Plugin fails #130

GencoreOperative opened this issue Jan 3, 2018 · 1 comment

Comments

@GencoreOperative
Copy link
Contributor

GencoreOperative commented Jan 3, 2018

When attempting to use the latest version 2.20.1 of the Maven Surefire Plugin to run the JUnit tests the following error occurs.

I've not investigated it yet to understand the cause.

Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed: An API incompatibility was encountered > while executing org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test: java.lang.NoSuchMethodError: > org.apache.maven.surefire.report.SafeThrowable.(Ljava/lang/String;)V
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.apache.maven.plugins:maven-surefire-plugin:2.20.1
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/.../org/apache/maven/plugins/maven-surefire-plugin/2.20.1/maven-surefire-plugin-2.20.1.jar
[ERROR] urls[1] = file:/Users/.../org/forgerock/cuppa/cuppa-surefire/1.3.1/cuppa-surefire-1.3.1.jar
[ERROR] urls[2] = file:/Users/.../org/apache/maven/surefire/common-java5/2.19.1/common-java5-2.19.1.jar
[ERROR] urls[3] = file:/Users/.../org/forgerock/cuppa/cuppa/1.3.1/cuppa-1.3.1.jar
[ERROR] urls[4] = file:/Users/.../org/apache/maven/surefire/maven-surefire-common/2.20.1/maven-surefire-common-2.20.1.jar
[ERROR] urls[5] = file:/Users/.../org/apache/maven/plugin-tools/maven-plugin-annotations/3.3/maven-plugin-annotations-3.3.jar
[ERROR] urls[6] = file:/Users/.../org/apache/maven/surefire/surefire-api/2.20.1/surefire-api-2.20.1.jar
[ERROR] urls[7] = file:/Users/.../org/apache/maven/surefire/surefire-logger-api/2.20.1/surefire-logger-api-2.20.1.jar
[ERROR] urls[8] = file:/Users/.../org/apache/maven/surefire/surefire-booter/2.20.1/surefire-booter-2.20.1.jar
[ERROR] urls[9] = file:/Users/.../org/codehaus/plexus/plexus-utils/1.5.15/plexus-utils-1.5.15.jar
[ERROR] urls[10] = file:/Users/.../junit/junit/4.12/junit-4.12.jar
[ERROR] urls[11] = file:/Users/.../org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
[ERROR] urls[12] = file:/Users/.../backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
[ERROR] urls[13] = file:/Users/.../org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar
[ERROR] urls[14] = file:/Users/.../org/slf4j/slf4j-jdk14/1.5.6/slf4j-jdk14-1.5.6.jar
[ERROR] urls[15] = file:/Users/.../org/slf4j/jcl-over-slf4j/1.5.6/jcl-over-slf4j-1.5.6.jar
[ERROR] urls[16] = file:/Users/.../org/apache/maven/reporting/maven-reporting-api/3.0/maven-reporting-api-3.0.jar
[ERROR] urls[17] = file:/Users/.../org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[18] = file:/Users/.../org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]

Using 2.19.1 works ok.

@alx75
Copy link

alx75 commented Jan 28, 2018

Hello rwhapshott,

This version of cuppa-surefire is compiled with the version 2.19.1 of common-java5 which hasn't the org.apache.maven.surefire.report.SafeThrowable.(Ljava/lang/String;)V.
This constructor is used in the unmarshalling of stackTraceWriter in version 2.20.1 and the provider depends on it when using the SimpleReportEntry

If you wish to use surefire 2.20.1 cuppa-surefire must depend on the same version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants