Tuesday, August 14, 2007

Build a JAR of JARs with Maven2

If you want to create a ZIP or JAR made up of other artifacts, one option is using the maven-dependency-plugin. Here's a quick how-to:

1. Explicitly list the artifacts you want included.


2. Configure the plugin as needed



Anonymous said...

And how does the classloader find classes in the included jars. I have tried this approach, but when trying to run the 'main' method from the jar, I get a Class Not Found Exception from the line in 'main' where I make the first reference to a class included in one of the jarred jars.

CuppajavaMattiz said...

Hero, you need to add the classpath to the manifest file in meta-inf