uPortal-Attic/email-preview

maven-war-plugin v3.2.3 cause error

jgribonvald opened this issue · 5 comments

Since the upgrade to maven-war-plugin v3.2.3 from 3.2.2 the war package can't be generated anymore.

Here is the error:

4257 [INFO] ------------------------------------------------------------------------
4257 [INFO] BUILD FAILURE
4257 [INFO] ------------------------------------------------------------------------
4258 [INFO] Total time: 3.782 s
4258 [INFO] Finished at: 2020-05-05T18:47:09+02:00
4385 [INFO] Final Memory: 39M/473M
4385 [INFO] ------------------------------------------------------------------------
4387 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:3.2.3:war (default-war) on project email-preview: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:3.2.3:war failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-war-plugin:3.2.3:war: java.lang.NoSuchMethodError: org.codehaus.plexus.archiver.jar.JarArchiver.setMinimalDefaultManifest(Z)V
4387 [ERROR] -----------------------------------------------------
4387 [ERROR] realm =    plugin>org.apache.maven.plugins:maven-war-plugin:3.2.3
4387 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
4387 [ERROR] urls[0] = file:/opt/repo_maven/local/org/apache/maven/plugins/maven-war-plugin/3.2.3/maven-war-plugin-3.2.3.jar
4387 [ERROR] urls[1] = file:/opt/repo_maven/local/org/codehaus/plexus/plexus-archiver/3.0.1/plexus-archiver-3.0.1.jar
4387 [ERROR] urls[2] = file:/opt/repo_maven/local/org/codehaus/plexus/plexus-io/2.6/plexus-io-2.6.jar
4387 [ERROR] urls[3] = file:/opt/repo_maven/local/org/iq80/snappy/snappy/0.3/snappy-0.3.jar
4387 [ERROR] urls[4] = file:/opt/repo_maven/local/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
4387 [ERROR] urls[5] = file:/opt/repo_maven/local/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
4387 [ERROR] urls[6] = file:/opt/repo_maven/local/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
4387 [ERROR] urls[7] = file:/opt/repo_maven/local/org/codehaus/plexus/plexus-component-annotations/1.7.1/plexus-component-annotations-1.7.1.jar
4387 [ERROR] urls[8] = file:/opt/repo_maven/local/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
4387 [ERROR] urls[9] = file:/opt/repo_maven/local/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
4387 [ERROR] urls[10] = file:/opt/repo_maven/local/org/apache/maven/maven-archiver/3.4.0/maven-archiver-3.4.0.jar
4387 [ERROR] urls[11] = file:/opt/repo_maven/local/org/apache/maven/shared/maven-shared-utils/3.2.1/maven-shared-utils-3.2.1.jar
4387 [ERROR] urls[12] = file:/opt/repo_maven/local/commons-io/commons-io/2.5/commons-io-2.5.jar
4387 [ERROR] urls[13] = file:/opt/repo_maven/local/org/codehaus/plexus/plexus-interpolation/1.25/plexus-interpolation-1.25.jar
4387 [ERROR] urls[14] = file:/opt/repo_maven/local/com/thoughtworks/xstream/xstream/1.4.10/xstream-1.4.10.jar
4387 [ERROR] urls[15] = file:/opt/repo_maven/local/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1.jar
4387 [ERROR] urls[16] = file:/opt/repo_maven/local/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar
4387 [ERROR] urls[17] = file:/opt/repo_maven/local/org/codehaus/plexus/plexus-utils/3.2.0/plexus-utils-3.2.0.jar
4387 [ERROR] urls[18] = file:/opt/repo_maven/local/org/apache/maven/shared/maven-filtering/3.1.1/maven-filtering-3.1.1.jar
4387 [ERROR] urls[19] = file:/opt/repo_maven/local/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar
4387 [ERROR] urls[20] = file:/opt/repo_maven/local/org/apache/maven/shared/maven-mapping/3.0.0/maven-mapping-3.0.0.jar
4387 [ERROR] Number of foreign imports: 1
4387 [ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

and the context:

Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-11T22:58:10+02:00)
Maven home: /opt/apache-maven-3.2.3
Java version: 1.8.0_252, vendor: Private Build
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: fr_FR, platform encoding: UTF-8
OS name: "linux", version: "5.3.0-51-generic", arch: "amd64", family: "unix"

moving back to maven-war-plugin version 3.2.2 run well the mvn package !

@ChristianMurphy the error provided is already with the maven debug option, all information provided are in this log, the complete stacktrace doesn't provide more things.
One thing, this happen also with maven 3.6.x.
I reported the error from someone and in waiting I told him to run with the lower version of mvn-war-plugin.

After it could be related to what you pointed. It may be interesting to test with other version plugin used around.

the error provided is already with the maven debug option, all information provided are in this log, the complete stacktrace doesn't provide more things.

understood, thanks

One thing, this happen also with maven 3.6.x.

🤔 interesting

And if you watch on last travis test, all are failing since the merge of this update commit, you can see on the same error !