DevSnobo commented on issue #184:
URL:
https://github.com/apache/maven-jar-plugin/issues/184#issuecomment-3432243357
This issue seems to be back with Maven 4.0.0-rc-4:
```
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-jar-plugin:4.0.0-beta-1:jar (default-jar) on
project redacted: 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:/C:/Users/USER/.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:/C:/Users/USER/.m2/repository/org/apache/maven/shared/file-management/3.1.0/file-management-3.1.0.jar
[ERROR] urls[2] =
file:/C:/Users/USER/.m2/repository/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar
[ERROR] urls[3] =
file:/C:/Users/USER/.m2/repository/org/codehaus/plexus/plexus-utils/4.0.1/plexus-utils-4.0.1.jar
[ERROR] urls[4] =
file:/C:/Users/USER/.m2/repository/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar
[ERROR] urls[5] =
file:/C:/Users/USER/.m2/repository/org/apache/maven/maven-archiver/4.0.0-beta-1/maven-archiver-4.0.0-beta-1.jar
[ERROR] urls[6] =
file:/C:/Users/USER/.m2/repository/org/apache/maven/maven-api-meta/4.0.0-beta-3/maven-api-meta-4.0.0-beta-3.jar
[ERROR] urls[7] =
file:/C:/Users/USER/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.27/plexus-interpolation-1.27.jar
[ERROR] urls[8] =
file:/C:/Users/USER/.m2/repository/org/codehaus/plexus/plexus-archiver/4.9.2/plexus-archiver-4.9.2.jar
[ERROR] urls[9] =
file:/C:/Users/USER/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar
[ERROR] urls[10] =
file:/C:/Users/USER/.m2/repository/org/codehaus/plexus/plexus-io/3.4.2/plexus-io-3.4.2.jar
[ERROR] urls[11] =
file:/C:/Users/USER/.m2/repository/org/apache/commons/commons-compress/1.26.1/commons-compress-1.26.1.jar
[ERROR] urls[12] =
file:/C:/Users/USER/.m2/repository/org/apache/commons/commons-lang3/3.14.0/commons-lang3-3.14.0.jar
[ERROR] urls[13] =
file:/C:/Users/USER/.m2/repository/commons-codec/commons-codec/1.16.1/commons-codec-1.16.1.jar
[ERROR] urls[14] =
file:/C:/Users/USER/.m2/repository/org/iq80/snappy/snappy/0.4/snappy-0.4.jar
[ERROR] urls[15] =
file:/C:/Users/USER/.m2/repository/org/tukaani/xz/1.9/xz-1.9.jar
[ERROR] urls[16] =
file:/C:/Users/USER/.m2/repository/com/github/luben/zstd-jni/1.5.5-11/zstd-jni-1.5.5-11.jar
[ERROR] urls[17] =
file:/C:/Users/USER/.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
```
I'm currently just migrating our build to Maven 4 for testing. Due to other
plugin incompatibilities, I can't downgrade to rc2.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]