Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
4.0.0-beta-1
-
None
-
None
-
$> mvn --version
Apache Maven 4.0.0-beta-4 (697c543b4e3bbec1b99e9d4d1ee8e0302e748f09)
Maven home: /Users/khm/tools/apache-maven-4.0.0-beta-4
Java version: 22.0.2, vendor: Eclipse Adoptium, runtime: /Users/khm/.sdkman/candidates/java/22.0.2-tem
Default locale: en_DE, platform encoding: UTF-8
OS name: "mac os x", version: "14.6.1", arch: "aarch64", family: "mac"
$> mvn --version Apache Maven 4.0.0-beta-4 (697c543b4e3bbec1b99e9d4d1ee8e0302e748f09) Maven home: /Users/khm/tools/apache-maven-4.0.0-beta-4 Java version: 22.0.2, vendor: Eclipse Adoptium, runtime: /Users/khm/.sdkman/candidates/java/22.0.2-tem Default locale: en_DE, platform encoding: UTF-8 OS name: "mac os x", version: "14.6.1", arch: "aarch64", family: "mac"
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