I don't undestand this... since when did compile-time libraries become not needed in runtime ? even servlet-api is needed at runtime, its just that they're being provided by the containers. Please use exclusions.

From how I see it, let's say we have Artifacts A, B and C. A depends on B and C depends on A.

If C doesn't need use the portion of A that uses the library B, then C can put an exclude clause for B in his dependency in A. That will work.

But if you put B as provided in A, then that may only be correct for C. What if there is another artifact D that depends on A entirely, including the portion which uses B ? you then add dependency B into D's pom. Then later on, you'll say why does D depend on B? its not logically correct anymore. So using exclusions is more appropriate.


Hope that helps.


^_^


Bashar Abdul Jawad wrote:
It is the right solution. Using exclusions will exclude a dependency from
being downloaded at all, which means it won't be available at any path.
Using provided will still make the dependency available for compile time,
but not in runtime, and will not bundle it in the package.

Read maven FAQ:
http://maven.apache.org/general.html#scope-provided



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carlos
Sanchez
Sent: Tuesday, February 06, 2007 4:29 PM
To: Maven Users List
Subject: Re: dependencies are bloated in M2

that's not the right solution, you have to use exclusions

On 2/6/07, Bashar Abdul Jawad <[EMAIL PROTECTED]> wrote:
It will. If you don't want to include a particular dependency in your
generated package just give it the provided scope, it will be excluded
even
if it was a transitive dependency of something else.

Bashar

-----Original Message-----
From: Christian Goetze [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 06, 2007 2:58 PM
To: Maven Users List
Subject: Re: dependencies are bloated in M2

Tandon, Pankaj wrote:

So the questions are:
1. How can we control what get's into WEB-INF/lib. We tried all the
scopes mentioned, but that did not help.

I believe that the scope that should work is "provided". The problem is
that I don't know if maven is smart enough to remove a provided
dependency from the transitive closure. I would call that a bug if it
didn't.

--
cg

---------------------------------------------------------------------
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