You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Sonar, Nishant" <ni...@wachovia.com> on 2008/03/26 20:34:04 UTC

packing jars in another jar

Hi 

 

I have multi module project. I need to make a distributable JAR in a way
that should hold all the dependent jars, including the jars referred by
dependent jars.

 

Need help 

 

I am trying to pack dependent jars in another jars (don't want to use
assembley plugin)  

 

Is it possible with jar plugin? I need to add a maniest file to include
dependent files in the class path too. This facility is in the jar
plugin.

 

Regards,

Nishant Sonar


Re: packing jars in another jar

Posted by Wayne Fay <wa...@gmail.com>.
Before you do this, make sure you understand the requirement.

The Java Classloader does not have the ability to deal with Jars
bundled inside Jars. This is simply not part of the spec. So, if
someone is asking you for this, make sure they know what they're
asking for.

Bundling Jars inside Wars and Ears? Sure. But not Jar in Jar.

Wayne

On 3/26/08, Damian Carrillo <da...@gmail.com> wrote:
> It's not possible with the jar plugin but it is possible with the
> shade plugin, although I've never used it so I can't comment more than
> that.
>
> http://maven.apache.org/plugins/maven-shade-plugin/
>
> On Wed, Mar 26, 2008 at 2:34 PM, Sonar, Nishant
> <ni...@wachovia.com> wrote:
> > Hi
> >
> >
> >
> > I have multi module project. I need to make a distributable JAR in a way
> > that should hold all the dependent jars, including the jars referred by
> > dependent jars.
> >
> >
> >
> > Need help
> >
> >
> >
> > I am trying to pack dependent jars in another jars (don't want to use
> > assembley plugin)
> >
> >
> >
> > Is it possible with jar plugin? I need to add a maniest file to include
> > dependent files in the class path too. This facility is in the jar
> > plugin.
> >
> >
> >
> > Regards,
> >
> > Nishant Sonar
> >
> >
>
>
>
> --
> Damian Carrillo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: packing jars in another jar

Posted by Damian Carrillo <da...@gmail.com>.
It's not possible with the jar plugin but it is possible with the
shade plugin, although I've never used it so I can't comment more than
that.

http://maven.apache.org/plugins/maven-shade-plugin/

On Wed, Mar 26, 2008 at 2:34 PM, Sonar, Nishant
<ni...@wachovia.com> wrote:
> Hi
>
>
>
>  I have multi module project. I need to make a distributable JAR in a way
>  that should hold all the dependent jars, including the jars referred by
>  dependent jars.
>
>
>
>  Need help
>
>
>
>  I am trying to pack dependent jars in another jars (don't want to use
>  assembley plugin)
>
>
>
>  Is it possible with jar plugin? I need to add a maniest file to include
>  dependent files in the class path too. This facility is in the jar
>  plugin.
>
>
>
>  Regards,
>
>  Nishant Sonar
>
>



-- 
Damian Carrillo

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


Re: packing jars in another jar

Posted by lo...@jpmchase.com.
Use the maven-dependency-plugin and this will serve your purpose.


Thanks & Regards,
Logu Rajamanickam





"Sonar, Nishant" <ni...@wachovia.com> 
03/26/2008 02:34 PM
Please respond to
"Maven Users List" <us...@maven.apache.org>


To
"Maven Users List" <us...@maven.apache.org>
cc

Subject
packing jars in another jar






Hi 

 

I have multi module project. I need to make a distributable JAR in a way
that should hold all the dependent jars, including the jars referred by
dependent jars.

 

Need help 

 

I am trying to pack dependent jars in another jars (don't want to use
assembley plugin) 

 

Is it possible with jar plugin? I need to add a maniest file to include
dependent files in the class path too. This facility is in the jar
plugin.

 

Regards,

Nishant Sonar




-----------------------------------------
This communication is for informational purposes only. It is not
intended as an offer or solicitation for the purchase or sale of
any financial instrument or as an official confirmation of any
transaction. All market prices, data and other information are not
warranted as to completeness or accuracy and are subject to change
without notice. Any comments or statements made herein do not
necessarily reflect those of JPMorgan Chase & Co., its subsidiaries
and affiliates.

This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED. Although this transmission and any
attachments are believed to be free of any virus or other defect
that might affect any computer system into which it is received and
opened, it is the responsibility of the recipient to ensure that it
is virus free and no responsibility is accepted by JPMorgan Chase &
Co., its subsidiaries and affiliates, as applicable, for any loss
or damage arising in any way from its use. If you received this
transmission in error, please immediately contact the sender and
destroy the material in its entirety, whether in electronic or hard
copy format. Thank you.

Please refer to http://www.jpmorgan.com/pages/disclosures for
disclosures relating to UK legal entities.