I've 3 projects business
, tools
& utils
. Tools depends external projects like commons-cli
and internal business
& utils
.
I'm using following build configuration.
<plugins>
<plugin>
<groupId>.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>my.mainClass</mainClass>
<classpathPrefix>lib/</classpathPrefix>
</manifest>
</archive>
<excludes>
<exclude>log4j.xml</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.5.1</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.directory}/lib/
</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
My project builds with following strucure.
tools.jar
lib/
business.jar
utils.jar
common-cli.jar
Is there a way to merge tools.jar, business.jar and utils.jar (to tools-with-dep.jar as those are my internal projects) and have following structure.
tools-with-dep.jar
lib/
commons-cli.jar