thanks, I went over those, but nothing is being built. I think the problem is that my top level project has no /src/main/java directory. In fact there is no /src/ directory at all meaning the pom.xml (parent pom) of all sub modules has no dependencies.
It just has many modules which have sub modules. The assembly plugin just includes unpacked jars of dependencies but since there are no dependencies, nothing is included in the jar. How do I tell the assembly plugin to include all jars of submodules ? (the top level project is just a container for sub-modules). I think most projects are like this so there must be a way. LM Baptiste MATHUS-4 wrote: > > Lisa, I see you have learnt some good practice from your recent experience > : > no hello, no thanks. So far, so good :-/. > > About having jars inside your jar, I suppose you want the other jars not > to > be unpacked. I asume you're familiar with the fact that having jars inside > your jar isn't standard and just won't work by default. > > Reading this > http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html#jar-with-dependencieswill > show you why everything is unpacked (that's the default), but you > surelyy already read this twice. > > Maybe also have a look here: > http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html. > From what you describe, it might be what you need. > > Cheers > > 2009/1/4 CheapLisa <[email protected]> > >> >> I have a project directory like: >> C:\home\projects\<myproject> >> >> In <myproject> there is <myproject>\pom.xml >> >> This pom is a top level pom (for many modules and those modules have >> sub-modules) >> and the packageing is set to "pom". >> >> What I want is to build one super jar that includes all jars in my >> project >> and all jars that were downloaded as dependencies (and dependencies of >> dependencies). >> >> How do I do this? >> >> I included in my top level pom in the build section the maven-assembly >> plugin >> but that just created a jar with some apache classes and did not include >> my >> jars (my modules) or any dependencies (like Spring, Log4J, etc). >> >> This is the <build> section of my top level pom.xml >> (<packaging>pom</packaging> >> <build> >> <plugins> >> <!-- Compiler --> >> <plugin> >> <artifactId>maven-compiler-plugin</artifactId> >> <configuration> >> <source>1.6</source> >> <target>1.6</target> >> <showDeprecation>true</showDeprecation> >> <showWarnings>true</showWarnings> >> <!-- Commented out fork to see if it fixes >> continuum >> build --> >> <!-- <fork>true</fork> --> >> </configuration> >> <!-- >> <compilerOption>-enableassertions</compilerOption> >> --> >> </plugin> >> >> <!-- >> ******************************************************************** --> >> <plugin> <!-- build a single superjar with all this >> project >> .jars and all dependent jars like spring, log4j etc (every <dependency> >> section will result in the inclusion of one or more jars in the super pom >> --> >> <artifactId>maven-assembly-plugin</artifactId> >> <executions> >> <execution> >> <phase>package</phase> >> <goals> >> <goal>assembly</goal> >> </goals> >> </execution> >> </executions> >> <configuration> >> <descriptorRefs> >> >> <descriptorRef>jar-with-dependencies</descriptorRef> >> </descriptorRefs> >> </configuration> >> </plugin> >> >> > > -- > Baptiste <Batmat> MATHUS - http://batmat.net > Sauvez un arbre, > Mangez un castor ! > > -- View this message in context: http://www.nabble.com/Problems-with-maven-building-a-%22super-jar%22-tp21278586p21279021.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
