You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Armin Ehrenfels <Ar...@t-online.de> on 2007/02/26 13:58:46 UTC

packaging jar files ...

Hi,

say, I have projects A, B, C, all subprojects of project D, each 
creating its own class files. How can maven package the class files of 
all three projects into one jar archive ? Any ideas ?

TIA

Armin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: packaging jar files ...

Posted by Armin Ehrenfels <Ar...@t-online.de>.
John and Jo,

thanks for your quick responses. That's what I was looking for.

Regards

Armin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: packaging jar files ...

Posted by Jo Vandermeeren <jo...@gmail.com>.
Hi Armin,

Maven produces one artifact per module/project, which is usually the best
way to go..
If you do need the dependencies of a module packaged within the final
artifact:
 - for maven 1: check out the uberjar plugin at
http://maven.apache.org/maven-1.x/plugins/uberjar/
 - for maven 2: configure the assembly plugin appropriately

Here's a maven 2 snippet:

 <build>
        <plugins>
<!-- snip -->
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
            </plugin>
<!-- snip -->
        </plugins>
 </build>


Good luck
Jo



On 2/26/07, Armin Ehrenfels <Ar...@t-online.de> wrote:
>
> Hi,
>
> say, I have projects A, B, C, all subprojects of project D, each
> creating its own class files. How can maven package the class files of
> all three projects into one jar archive ? Any ideas ?
>
> TIA
>
> Armin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: [m2] packaging jar files ...

Posted by "John J. Franey" <jj...@verizon.net>.
Assuming this is related to maven 2, see:
http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/index.html

I cannot provide an answer for maven 1; I have not used it.

Regards,
John


Armin Ehrenfels wrote:
> 
> Hi,
> 
> say, I have projects A, B, C, all subprojects of project D, each 
> creating its own class files. How can maven package the class files of 
> all three projects into one jar archive ? Any ideas ?
> 
> TIA
> 
> Armin
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/packaging-jar-files-...-tf3292690s177.html#a9161460
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org