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 !

Reply via email to