everything you said is right ;) in an ideal world the only reason to use exclusions is if you are not using a portion of the library that the developer consider "required" for most of the people
On 2/6/07, Craig McClanahan <[EMAIL PROTECTED]> wrote:
On 2/6/07, Carlos Sanchez <[EMAIL PROTECTED]> wrote: > > exactly, that's why he needs to use exclusions, you exclude things > that you don't need. Exclusions can get you around immediate build problems, but a feedback loop is necessary to improve the state of the world in general, or the problem will just repeat itself the next time. If your project has a dependency "x", and that artifact has an optional dependency "y", the POM for "x" should explicity *say* it is optional. That will cause the web project to do the right thing ... *not* copy in the optional dependencies unless you explicitly declare a dependency on them yourself. Thus, people who published depency "x" in this scenario need to be lobbied to get their POMs fixed in the next version, to stop causing everyone who uses Maven and their "x" library grief down the road. A classic case that I know of personally :-) is Jakarta Commons Logging, where the 1.1 version of the POM declares a dependency on the servlet API but mistakenly did not declare it to be optional. Yes, you as a user of Commons Logging can use an exclusion to get rid of the unwanted file, but why should you (or anyone else) *have* to? Wouldn't the "right thing" be to also go file a bug against C-L to fix their blasted POM? (You don't actually have to for this particular scenario ... the POM has been fixed in the trunk and a 1.1.1 release is likely very soon primarily to address this issue ... but my point is in general it is the people who publish broken POMs that should be complained at here, not Maven itself.) Craig McClanahan 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] > >
-- 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]