It answers the question how do I factorise a maven assembly descriptor when
- there is a common structure for several assemblies
- eventually a subpart of the assembly is specific for some modules
The example project is organised as follows:
maven-assembly-example
+-assembly-common-resources
+-assembly-component
+-assembly-example1
+-assembly-example2
assembly-example1 and assembly-example1 modules both leverage assembly-component to create their own assembly.
maven-assembly-example example illustrates how to factorise maven assembly descriptors to define a common skeleton and a specific part in submodule
To run the main class within the assemblies on Linux or Mac OS, e.g.: example1
cd assembly1/target/
unzip *.zip
cd assembly-example1-1.0-SNAPSHOT
javac -cp .:lib/slf4j-api-1.7.5.jar:lib/slf4j-log4j12-1.7.5.jar:lib/log4j-1.2.17.jar fr/kdefombelle/assembly/Example1Main.java
java -cp .:conf:lib/slf4j-api-1.7.5.jar:lib/slf4j-log4j12-1.7.5.jar:lib/log4j-1.2.17.jar fr/kdefombelle/assembly/Example1Main