Hi

I have also similar kind of problem and needs an effective solution. 

Problem: Let's say we have one custom module for creating jar file let's
the name of the jar file is A.jar and that module is dependent upon
let's say 10 third party jars.

Now i have one module for creating war file and i need to add A.jar in
the lib directory of this war file, but i dont require theses 10 jars on
which A.jar is dependent so how can i resist these unwanted jars to pack
inside lib directory of the war file. The problem may not be exactly
same but yes the scenario is pretty much similar.

So could anyone please tell me how to avoid these transitive
dependencies to get intrude in the lib directory of the war file.

Regards

Vishal. 

-----Original Message-----
From: amit kumar [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 09, 2008 12:46 PM
To: Maven Users List
Subject: Re: How to avoid transitive Dependencies getting packaged

The one reason at the moment of not including the transitive
dependencies is
the redundant jar files in the lib folder of the packaged WAR.
For instance in the lib folder of the WAR i can see
commons-logging-1.0.4(transitive
dependency of something which I am not able to figure out even after
using
-X with maven goal) and commons-logging-1.1(explicit in the pom.xml).
And
there were some more similar occurrences like that of two versions of
spring
hibernate etc.

Regards,
Amit

On Jan 9, 2008 3:07 AM, Brewster, Richard <[EMAIL PROTECTED]>
wrote:

> Why do you want to exclude the transitive dependencies?  Is it because
> these provided by your container (JBoss, Tomcat) and you wish to use
> those provided versions?  How do you verify that the container's
> versions are compatible?
>
> Richard Brewster
> Senior Associate
> Perrin Quarles Associates
> [EMAIL PROTECTED]
> (434) 817-2640
>
>
> -----Original Message-----
> From: Wayne Fay [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 08, 2008 9:51 AM
> To: Maven Users List
> Subject: Re: How to avoid transitive Dependencies getting packaged
>
> The way I do this (and there may be another or better way), I add
> explicitly add the transitive dependencies to my pom, and mark them as
> scope "provided".
>
> Wayne
>
> On 1/8/08, amit kumar <[EMAIL PROTECTED]> wrote:
> > Hi,
> > I am building a WAR, but I see some jar files in the lib WEB-INF\lib
> > folder in the build which are not mentioned in the pom.xml, and
> > probably are transitive dependencies. How do I make sure the
> > transitive dependencies are not put in the lib folder.
> > I looked on maven-war-plugin FAQs but not any help.
> >
> >
> > Could someone please guide on that.
> >
> > Regards,
> > Amit
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to