Thanks for all the suggestions. So I can't download and install this plugin 
using the usual mvn commands (can't remember what they are)?

----- Original Message ----
From: Tommy Knowlton <[EMAIL PROTECTED]>
To: Maven Users List <[email protected]>
Sent: Friday, 24 August, 2007 4:03:26 PM
Subject: Re: provided dependencies


Wayne, I see what you mean. I'm wondering whether the maven- 
dependency-plugin has been changing lately, I seem to recall using a  
plugin some months ago (I thought I remembered it was maven- 
dependency-plugin, it looks like I was wrong) that generates a report  
that shows what deps were (transitively) included, and why...

Aha, here it is: http://maven.apache.org/plugins/maven-project-info- 
reports-plugin/dependencies-mojo.html

Sorry, it's in a different plugin than I earlier mentioned.

\Tommy

On  24 Aug 2007, at 12:39 , Wayne Fay wrote:

> Of course, since the tree mojo is not available in any released
> dependency version (yet), this means pulling the code down from SVN
> and "mvn install" locally or adding the Codehaus Snapshot repo to your
> pom... So hopefully you have some idea what you're doing. ;-)
>
> Wayne
>
> On 8/24/07, Tim Kettler <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> the description of the dependency scope table referenced below  
>> would be
>> clearer (at least in my opinion) if it would read:
>>
>> "Each of the scopes affects transitive dependencies in different  
>> ways,
>> as is demonstrated in the table below. If a dependency is set to the
>> scope in the left column, __transitive dependencies of that  
>> dependency__
>> with the scope across the top row will result in a dependency in the
>> main project with the scope listed at the intersection. If no  
>> scope is
>> listed, it means the dependency will be omitted."
>>
>> So what is most probably happening is that you have declared another
>> non-provided-scoped dependency (to commons-logging for example) which
>> depends on the servlet-api non-transitively (see the pom of
>> commons-logging [1]). Therefore the servlet-api gets pulled in though
>> your direct dependency has scope provided.
>>
>> So as Tommy wrote your best chance is to use the dependency-plugin to
>> print your dependency tree and see which other dependency depends  
>> on the
>> servlet-api and then exclude it from that dependency.
>>
>> -Tim
>>
>> [1]
>> http://repo1.maven.org/maven2/commons-logging/commons-logging/1.1/ 
>> commons-logging-1.1.pom
>>
>> DM schrieb:
>>> 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 <[email protected]>
>>> 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]
>>
>>
>> ---------------------------------------------------------------------
>> 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]


      ___________________________________________________________ 
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