I am trying to create an assembly which depends on the output of the built-in assembly jar-with-dependencies
. The resulting assembly is specific to an architecture.
E.g. I want to create a ZIP which contains the JAR output by jar-with-dependencies
plus a script file and a library directory.
I have tried the following. In the pom.xml
file:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<descriptors>
<descriptor>src/main/assembly/linux64.xml</descriptor>
<descriptor>src/main/assembly/windows64.xml</descriptor>
</descriptors>
<archive>
<manifest>
<mainClass>es.entrees.BoxOffice</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
And then the descriptor files. One of them:
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>linux64</id>
<formats>
<format>zip</format>
</formats>
<files>
<file>
<source>target/${project.artifactId}-${project.version}-jar-with-dependencies.jar</source>
<outputDirectory>/</outputDirectory>
</file>
</files>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
...
</depdendencySets>
</assembly>
But the custom descriptors are run first, while the output from jar-with-dependencies
is not there yet.
Should I use submodules?