Closed crimsonman2 closed 3 years ago
Upgrading maven-assembly-plugin to version 3.1.1 fails as well but with another error: "maven-assembly-plugin:3.1.1:single: java.lang.NoSuchMethodError: org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.addRawArchiveEntry(Lorg/apache/commons/compress/archivers/zip/ZipArchiveEntry;Ljava/io/InputStream;)V"
But, if comment-out alfresco-maven-plugin from maven-assembly-plugin dependencies and change format in amp.xml assembly descriptor to zip build completes successfully.
So I suppose there is something wrong with alfresco-maven-plugin. Have you tested AMPs assembly with Java 11 ?
Hey @crimsonman2 - Unfortunately I'm not able to reproduce this issue. Could you please provide also the parent pom and the pom file of the failing module?
Hi, attached POMs that you asked for. Also have to mention that I've tried to update Maven to v3.6.2 with no result. Stack traces for assembly plugin v.2.6 and 3.1.1 also attached maven-assembly-plugin_2.6.log maven-assembly-plugin_3.1.1.log
Eventually assembly succeeded, but only when I've removed <version>
tag for maven-assembly-plugin in AIO parent POM.
Hey @crimsonman2,
I've checked the POM files and they should be fine. Could you maybe also attache the descriptor file "src/main/assembly/amp.xml" from the "alfresco-platform"-module? It looks like the error is occuring while reading this file.
Upgrading jdk from
$ java -version
openjdk version "11" 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)
to
$ java -version
openjdk version "11.0.9.1" 2020-11-04
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.9.1+1)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.9.1+1, mixed mode)
solve the problem for me!
When trying to build an APM in Alfresco SDK 4.0 AIO project using OpenJDK 11 build fails with an error: "An API incompatibility was encountered while executing org.apache.maven.plugins:maven-assembly-plugin:2.6:single: java.lang.ExceptionInInitializerError: null".
In the same time if I switch to Java 8 build succeeds.
See details in attached log file. build.log
Expected Behavior
Build should succeed, AMP file generated.
Current Behavior
Build fails with an error: "An API incompatibility was encountered while executing org.apache.maven.plugins:maven-assembly-plugin:2.6:single: java.lang.ExceptionInInitializerError: null".
Possible Solution
Steps to Reproduce (for bugs)
Context
Writing extensions using third party libs, also have a need to override static resources (i.e. favicon.ico). Recommendations from SDK manual says that in that case I have to use APM packaging and not JAR.
Your Environment
Additional information