Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.3.0
-
None
-
None
-
Java 1.8 Maven 3.3.9 (explicit dependencies on 3.3.9)
Description
When trying to use the maven-plugin-testing-harness per the instructions, any 3.3.x Maven version produces the following error:
java.lang.NoSuchMethodError: org.apache.maven.artifact.versioning.DefaultArtifactVersion.compareTo(Lorg/apache/maven/artifact/versioning/ArtifactVersion;)I at io.cotiviti.test.maven.MyMojoTest.setUp(MyMojoTest.java:36)
Specifically from this code in org.apache.maven.plugin.testing.AbstractMojoTestCase, line 149-150 :
assertTrue( "Maven 3.2.4 or better is required", MAVEN_VERSION == null || new DefaultArtifactVersion( "3.2.3" ).compareTo( MAVEN_VERSION ) < 0 );
During the run, MAVEN_VERSION is set to 3.3.9 (correctly). However, for whatever reason, the compareTo function of DefaultArtifactVersion does not seem to be available.