build dependencies are added in plugin dependencies section so they
don't interfere with your code dependencies

On 2/6/07, Bashar Abdul Jawad <[EMAIL PROTECTED]> wrote:
Yes, but sometimes you will need to use a dependency for compile time only,
and NOT for runtime. You don't need the container to provide it for you
either because it is not required for runtime. Example: aspectjtools.jar.
You can't exclude it because your project will not compile. The only way is
to give it the provided scope. Even if your container doesn't provide it
that's not a problem, maven doesn't care. I know it is not very clean to
give a dependency a provided scope when it's not going to be provided
anywhere, but sometimes you need to do this if you want to compile against
it.

Bashar

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

still not right, you have to use exclusions
provided means the environment (read appserver) "provides" that
dependency, which is only true for few dependencies in the whole
world, like servlet-api

On 2/6/07, Bashar Abdul Jawad <[EMAIL PROTECTED]> wrote:
>
> This is the question I was answering:
>
> >Tandon, Pankaj wrote:
> >
> >1. How can we control what get's into WEB-INF/lib. We tried all the
> >scopes mentioned, but that did not help.
>
> And it's follow up:
>
> > >Christian Goetze wrote:
> > >
> > > 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.
>
> And the answer to these 2 questions is to use the provided scope. It will
> also stop a dependency from being passed on transitively. Using exclusions
> is NOT right if you still want to compile against these dependencies.
>
> Bashar
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carlos
> Sanchez
> Sent: Tuesday, February 06, 2007 5:02 PM
> To: Maven Users List
> Subject: Re: dependencies are bloated in M2
>
> exactly, that's why he needs to use exclusions, you exclude things
> that you don't need.
>
> On 2/6/07, Bashar Abdul Jawad <[EMAIL PROTECTED]> 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]
> > >
> > >
> >
> >
> > --
> > I could give you my word as a Spaniard.
> > No good. I've known too many Spaniards.
> >                              -- The Princess Bride
> >
> > ---------------------------------------------------------------------
> > 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]
> >
> >
>
>
> --
> I could give you my word as a Spaniard.
> No good. I've known too many Spaniards.
>                              -- The Princess Bride
>
> ---------------------------------------------------------------------
> 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]
>
>


--
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                             -- The Princess Bride

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




--
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                            -- The Princess Bride

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

Reply via email to