As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
Unfortunately, having a standard configuration of building AMP files maven version 3.9 does not build them (maven 3.8 already does). Do you know why this is happening? How to fix it?
<plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <id>build-amp-file</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <appendAssemblyId>false</appendAssemblyId> <descriptor>src/main/assembly/amp.xml</descriptor> <ignoreMissingDescriptor>true</ignoreMissingDescriptor> </configuration> </execution> </executions> <dependencies> <dependency> <groupId>org.alfresco.maven.plugin</groupId> <artifactId>alfresco-maven-plugin</artifactId> <version>${alfresco.sdk.version}</version> </dependency> </dependencies> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.13.0</version> <configuration> <release>17</release> </configuration> </plugin> </plugins>
I managed to find that the problem is not with the maven version, but with the maven-assembly-plugin version. We don't specify the version in our projects, so maven 3.8 selects the 2.2-beta version of the plugin, while maven 3.9 selects version 3.6. By manually selecting the latest version 3.7.1 and maven 3.9, I unfortunately get an error
Execution build-amp-file of goal org.apache.maven.plugins:maven-assembly-plugin: 3.7.1:single failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-assembly-plugin:3.7.1:single: java.lang.NoSuchMethodError: 'void org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.addRawArchiveEntry(org.apache.commons.compress.archivers.zip.ZipArchiveEntry, java.io.InputStream)' [ERROR] ----------------------------------------------------- [ERROR] realm = plugin>org.apache.maven.plugins:maven-assembly-plugin:3.7.1 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
I have not been able to fix the problem. It seems to be a problem with the commons-compress library and versions, but I haven't fixed it.