Uploaded image for project: 'Maven JAR Plugin'
  1. Maven JAR Plugin
  2. MJAR-312

failed: An API incompatibility was encountered

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.0.0-beta-1
    • 4.0.0
    • None
    • None

    Description

      Using the maven-jar-plugin version 4.0.0-beta-1 with Maven 4.0.0-beta-4 fails with the following error message:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:4.0.0-beta-1:jar (default-jar) on project tree: Execution default-jar of goal org.apache.maven.plugins:maven-jar-plugin:4.0.0-beta-1:jar failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-jar-plugin:4.0.0-beta-1:jar: java.lang.NoSuchMethodError: 'org.apache.maven.api.Artifact org.apache.maven.api.Project.getPomArtifact()'
      [ERROR] -----------------------------------------------------
      [ERROR] realm =    plugin>org.apache.maven.plugins:maven-jar-plugin:4.0.0-beta-1
      [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
      [ERROR] urls[0] = file:/Users/khm/.m2/repository/org/apache/maven/plugins/maven-jar-plugin/4.0.0-beta-1/maven-jar-plugin-4.0.0-beta-1.jar
      [ERROR] urls[1] = file:/Users/khm/.m2/repository/org/apache/maven/shared/file-management/3.1.0/file-management-3.1.0.jar
      [ERROR] urls[2] = file:/Users/khm/.m2/repository/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar
      [ERROR] urls[3] = file:/Users/khm/.m2/repository/org/codehaus/plexus/plexus-utils/4.0.1/plexus-utils-4.0.1.jar
      [ERROR] urls[4] = file:/Users/khm/.m2/repository/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar
      [ERROR] urls[5] = file:/Users/khm/.m2/repository/org/apache/maven/maven-archiver/4.0.0-beta-1/maven-archiver-4.0.0-beta-1.jar
      [ERROR] urls[6] = file:/Users/khm/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.27/plexus-interpolation-1.27.jar
      [ERROR] urls[7] = file:/Users/khm/.m2/repository/org/codehaus/plexus/plexus-archiver/4.9.2/plexus-archiver-4.9.2.jar
      [ERROR] urls[8] = file:/Users/khm/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar
      [ERROR] urls[9] = file:/Users/khm/.m2/repository/org/codehaus/plexus/plexus-io/3.4.2/plexus-io-3.4.2.jar
      [ERROR] urls[10] = file:/Users/khm/.m2/repository/org/apache/commons/commons-compress/1.26.1/commons-compress-1.26.1.jar
      [ERROR] urls[11] = file:/Users/khm/.m2/repository/org/apache/commons/commons-lang3/3.14.0/commons-lang3-3.14.0.jar
      [ERROR] urls[12] = file:/Users/khm/.m2/repository/commons-codec/commons-codec/1.16.1/commons-codec-1.16.1.jar
      [ERROR] urls[13] = file:/Users/khm/.m2/repository/org/iq80/snappy/snappy/0.4/snappy-0.4.jar
      [ERROR] urls[14] = file:/Users/khm/.m2/repository/org/tukaani/xz/1.9/xz-1.9.jar
      [ERROR] urls[15] = file:/Users/khm/.m2/repository/com/github/luben/zstd-jni/1.5.5-11/zstd-jni-1.5.5-11.jar
      [ERROR] urls[16] = file:/Users/khm/.m2/repository/org/apache/maven/plugin-tools/maven-plugin-annotations/4.0.0-beta-1/maven-plugin-annotations-4.0.0-beta-1.jar
      [ERROR] Number of foreign imports: 1
      [ERROR] import: Entry[import  from realm ClassRealm[maven.api.v4, parent: null]]
      [ERROR] 
      [ERROR] -----------------------------------------------------
      [ERROR] 
      [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 verbose output
      [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
      [ERROR] 
      [ERROR] After correcting the problems, you can resume the build with the command
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            khmarbaise Karl Heinz Marbaise
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: