Hi Thomas,
Thomas Recloux schrieb:
> Hello all,
>
>
> I'have got a projet with some modules producing their jars, but I'd
> like to produce one jar including all modules classes.
>
> I looked at the assembly plugin, but :
> - There is not "jar" format
> - I think I wil not be able to install or deploy the generated jar
> in local and remote repos.
I was asking a similar question a few days ago and thanks to this list,
I found a solution:
I have 3 modules, A, B and C. To create a big archive, P, including all
the class files, I had to add this to the parent pom:
...
<build>
<plugins>
...
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>descriptors/P-assembly.xml</descriptor>
</descriptors>
<finalName>P-${project.version}</finalName>
<workDirectory>target/assembly/work</workDirectory>
</configuration>
</plugin>
...
</plugins>
...
</build>
And P-assembly.xml: $groupId has to be replaced by your project groupid
<assembly>
<formats>
<format>jar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<moduleSets>
<moduleSet>
<includes>
<include>$groupId:A</include>
<include>$groupId:B</include>
<include>$groupId:C</include>
</includes>
<binaries>
<unpack>true</unpack>
</binaries>
</moduleSet>
</moduleSets>
</assembly>
And now:
mvn package assembly:assembly
Regards
Mirko
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]