Reputation: 65
Can Maven create two jars specified in one pom.xml: one jar with my app but without dependencies, and second jar ONLY with dependencies? I'd like to have two separate jars, but I want to run jar with my app and this app has to 'see' all dependencies in second jar. Everything I want to have in one eclipse project, only in result of one run of mvn:package I'd like to create separate jars...Is it possible? Now I use maven-jar-plugin to create jar with app, where I specify the classpath by add line in configuration of maven-jar-plugin:
<addClasspath>true</addClasspath>
Before I have used maven-assebly-plugin to create jar-with-dependencies, but now I have to create separate jar-s....
Thanks in advance, seishin
Upvotes: 6
Views: 2248
Reputation: 298898
Here's how I'd do it:
dependency:unpack
to
unpack all dependencies to a common
folder,Upvotes: 6