Thanks for the reply. Maybe I'm not understanding the documentation correctly, 
but in the table of the "Dependency Scope" section of this page:
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

it seems to say that a provided dependency is transitively provided, so doesn't 
that mean it still should not be copied to WEB-INF\lib?

----- Original Message ----
From: Tommy Knowlton <[EMAIL PROTECTED]>
To: Maven Users List <users@maven.apache.org>
Sent: Friday, 24 August, 2007 1:29:38 PM
Subject: Re: provided dependencies


my guess would be that both modules depend transitively on the  
javax.servlet in the runtime scope.

but, since guessing is not likely to be very helpful, may I recommend  
the maven-dependency-plugin, which can give you a report that may  
help you to locate the actual dependency chain that ends up bringing  
those in. Then, you should decide whether to use <exclusions/>  
elements in the <dependency/> declarations of those things that ended  
up bringing it in.

Hope that helps,
\Tommy

On  24 Aug 2007, at 11:12 , DM wrote:

> Hi,
>
> I have two maven modules, policy-core and policy-webapp. policy- 
> webapp depends on policy-core, and they are packaged as a war and  
> jar respectively. Both modules have the following dependency:
>
>     <dependency>
>       <groupId>javax.servlet</groupId>
>       <artifactId>servlet-api</artifactId>
>       <version>2.3</version>
>       <scope>provided</scope>
>     </dependency>
>
> When I package policy-webapp, I get both the following JARs in WEB- 
> INF\lib
>
> servlet-api-2.5-6.0.1.jar
> servlet-api-2.3.jar
>
> Obviously I don't want any servlet-api JARs in WEB-INF\lib becuase  
> they should be provided by the container - this is why I set the  
> scope to 'provided'.
> Both policy-core and policy-webapp extend the same POM, but their  
> parent POM doesn't mention servlet-api, so I don't think this is  
> particularly relevant.
>
> Any idea why these JARs are being copied to WEB-INF\lib and how I  
> can prevent this?
>
> Thanks in Advance,
> DM
>
>
>       ___________________________________________________________
> Yahoo! Answers - Got a question? Someone out there knows the  
> answer. Try it
> now.
> http://uk.answers.yahoo.com/
>
> ---------------------------------------------------------------------
> 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]


      ___________________________________________________________ 
Want ideas for reducing your carbon footprint? Visit Yahoo! For Good  
http://uk.promotions.yahoo.com/forgood/environment.html

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

Reply via email to