You can do a jar containing all dependencies with the following descriptor. However - the excludes doesn't work properly in the assembly plugin, so if you have dependencies that are signed, you'll have to fix them afterwards annoyingly.
You can also pack jars into the /lib and use something like one-jar - this is quicker, but I found one-jar loads everthing into memory before running (which fell over for me because my project is big). <assembly> <id>uberjar</id> <formats> <format>jar</format> </formats> <includeBaseDirectory>false</includeBaseDirectory> <dependencySets> <dependencySet> <outputDirectory></outputDirectory> <outputFileNameMapping></outputFileNameMapping> <unpack>true</unpack> <scope>runtime</scope> <unpackOptions> <excludes> <exclude>/META-INF/*.RSA</exclude> <exclude>/META-INF/*.DSA</exclude> <exclude>/META-INF/*.SF</exclude> <exclude>/META-INF/*.rsa</exclude> <exclude>/META-INF/*.dsa</exclude> <exclude>/META-INF/*.sf</exclude> </excludes> </unpackOptions> </dependencySet> </dependencySets> <fileSets> <fileSet> <directory>target/classes</directory> <outputDirectory></outputDirectory> </fileSet> </fileSets> </assembly> On Nov 14, 2007 2:04 AM, Steve Taylor <[EMAIL PROTECTED]> wrote: > > In theory, at the command line from the directory of the parent project, > just > type: > mvn -DdescriptorId=jar-with-dependencies assembly:assembly > and you should get a single jar with everything in it. > > In practice, what you actually get is a jar with just > META-INF/MANIFEST.MF. > So I am also really looking forward to the answer to this one. You'd think > a > simple problem like this would have a simple solution. Hopefully it does. > I > still want to believe that maven can make my life easier instead of > following the inversion of difficulty pattern inherent in many java tools > and frameworks (ie. difficult tasks are simplified and simple tasks become > difficult). > > > Brandon Enochs wrote: > > > > I'm trying to assemble a multi-module project with a single jar file for > > all of the modules in my project and a lib directory with all of jar > > files for my dependencies. Does anyone know how to do this with the > > assembly plugin? > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/maven-2.0.7-assembly-plugin-tf4755367s177.html#a13738602 > Sent from the Maven - Users mailing list archive at > Nabble.com<http://nabble.com/> > . > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >