Hi I need to assembly jars from multimodule project in master directory. Let us have a structure like this:
MASTER(pom)
|
+-A3(pom)
| +-A1(jar)
| +-A2(jar)
+-B3(pom)
+-B1(jar)
+-B2(jar)
What I want to achieve is to assembly all jar packaged modules in MASTER.
jars/
+- A1.jar
+- A2.jar
+- B1.jar
+- B2.jar
For now I achieved only good resolution on submodules (A3 and B3) by creating pom.xml like:
<modules>
<module>../A1</module>
<module>../A2</module>
</modules>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/main/assembly/bin.xml</descriptor>
</descriptors>
</configuration>
</plugin>
</plugins>
</build>
and assembly descriptor:
<moduleSets>
<moduleSet>
<includes>
<include>org.mycompany:A1</include>
<include>org.mycompany:A2</include>
</includes>
<binaries>
<includeDependencies>false</includeDependencies>
<outputDirectory>jars/${artifactId}</outputDirectory>
<unpack>false</unpack>
</binaries>
</moduleSet>
</moduleSets>
When I do
mvn clean package assembly:assembly
on submodules (A3 or B3) separately they seem to assembly their own submodules fine.
I don't know how to specify assembly descriptor in MASTER. The one similar to A3 and B3 descriptor does not deal with it ([ERROR] you must specify at least one file). I tried several additional tags like includeSubModules... still nothing.