Thursday, 8 August 2013

Maven assembly : bundle docs and sources jars

Maven assembly : bundle docs and sources jars

I have a multi-module maven project:
Parent (Pom)
|
Library_01 (jar)
| |
| lib1.jar
| |
| lib1-docs.jar
| |
| lib1-sources.jar
|
Library_02 (jar)
| |
| lib2.jar
| |
| lib2-docs.jar
| |
| lib2-sources.jar
|
Distribution (pom)
|
lib1.jar
|
lib2.jar
I'm assembling other module's binaries in Distribution module exactly as
explained in maven-assembly-plugin's documentation here. My POM's look
exactly as in the tutorial.
It works the way shown in documentation. In package phase, assembly plugin
collects both other module's jars in Distribution module. But as you can
see, the other library modules are also configured to produce docs and
source jars as well.
How do I configure assembly plugin to collect docs and sources jars of
other modules also ?
Thinking about distribution, can jars of all the other modules be combined
into one. Basically, I want 3 global jars (binary,docs and sources) to be
distributed. How can this be achieved ?

No comments:

Post a Comment