You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Mykel Alvis (JIRA)" <ji...@apache.org> on 2016/08/13 13:18:20 UTC

[jira] [Commented] (MPLUGINTESTING-52) AbstractMojoTestCase fails from NoSuchMethod

    [ https://issues.apache.org/jira/browse/MPLUGINTESTING-52?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15419915#comment-15419915 ] 

Mykel Alvis commented on MPLUGINTESTING-52:
-------------------------------------------

I appear to have made 2 mistakes here

# I was mistakenly including {{maven-project}} from something in my parent tree.
# I had {{maven-plugin-annotations}} too high in the dependency lineup for the plugin, which was resetting a couple of transitives. 



> AbstractMojoTestCase fails from NoSuchMethod
> --------------------------------------------
>
>                 Key: MPLUGINTESTING-52
>                 URL: https://issues.apache.org/jira/browse/MPLUGINTESTING-52
>             Project: Maven Plugin Testing
>          Issue Type: Bug
>          Components: plugin-testing-harness
>    Affects Versions: 3.3.0
>         Environment: Java 1.8   Maven 3.3.9 (explicit dependencies on 3.3.9)
>            Reporter: Mykel Alvis
>
> When trying to use the {{maven-plugin-testing-harness}} [per the instructions|http://maven.apache.org/plugin-testing/maven-plugin-testing-harness/getting-started/index.html], any 3.3.x Maven version produces the following error:
> {code}
> 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)
> {code}
> Specifically from this code in {{org.apache.maven.plugin.testing.AbstractMojoTestCase}}, line 149-150 :
> {code:java}
>         assertTrue( "Maven 3.2.4 or better is required",
>                     MAVEN_VERSION == null || new DefaultArtifactVersion( "3.2.3" ).compareTo( MAVEN_VERSION ) < 0 );
> {code}
> 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.   



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)