If you want the jar file of module A working at runtime, how is that possible without the transitive libraries? Could you change the module to include those dependencies only at compile time? Then they won't be transitive at runtime.
With regards, Nick Stolwijk -----Original Message----- From: Vishal Pahwa [mailto:[EMAIL PROTECTED] Sent: Wed 1/9/2008 9:31 AM To: Maven Users List Subject: RE: How to avoid transitive Dependencies getting packaged Amit Thats pretty much fine but the problem is we have got plenty of dependencies and stopping them to get inside lib directory with this method is a bit cumbersome thats why i was lookin for some other efficient way if exists. Regards Vishal. -----Original Message----- From: amit kumar [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 09, 2008 1:53 PM To: Maven Users List Subject: Re: How to avoid transitive Dependencies getting packaged Vishal: you can use <dependency> <groupId>A</groupId> <artifactId>A</artifactId> <exclusions> <exclusion> <groupId></groupId> <artifactId><artifactId> </exclusion> <exclusions> </dependency> in exclusion you can specify the dependencies of A. As per my knowledge there would be one exclusion tag for each dependency. This is the only method I know by now. Nick: I am using Maven 2.0.7. And surprisingly I have used mvn site also to track the dependencies, but commons-logging-1.0.4 appears no where but straight in the WEB-INF folder. Not able to figure out where is it coming from. Regards, Amit On Jan 9, 2008 1:03 PM, Vishal Pahwa <[EMAIL PROTECTED]> wrote: > > > 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] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]