Done: http://jira.codehaus.org/browse/MNGSITE-23
Brian E. Fox schrieb:
I've never found that to be perfectly clear either. Would you mind
filing a jira with a patch?
-----Original Message-----
From: Tim Kettler [mailto:[EMAIL PROTECTED]
Sent: Friday, August 24, 2007 2:35 PM
To: Maven Users List
Subject: Re: provided dependencies
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/common
s-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-m
echanism.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]