I have a maven project, with a main project A and modules B and C. The children inherit from A's pom.
A
|
|----B
| |----pom.xml
|
|----C
| |----pom.xml
|
|----pom.xml
It already builds jars for all the modules. Is there a way to include the dependencies in those jars? E.g. so I get B-1.0-with-dependencies.jar
and C-1.0-with-dependencies.jar
? I have tried setting
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
In the parent pom, but it doesn't seem to do anything: the build succeeds, but I get regular, no-dependency jars.
I'd like to avoid putting something in each child pom, as in reality I have more than 2 modules. I'm sure there is some way to do this, but can't seem to work it out from the maven docs. Thanks!