Please just try it! We understand. The pom will pick your re-declaration of log4j/provided as "overriding" the log4j/compile in artifactA.
Wayne On 3/26/08, Lance Java <[EMAIL PROTECTED]> wrote: > I'm not sure if you understand. > artifactA is required so I specify a scope of "compile" > Since artifactA depends on log4j, it automagically brings that into the jar > too which I don't want. > > On 26/03/2008, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > Lance Java schrieb: > > > > > Hi, I'm a maven newbie and want to globally exclude sub dependencies > > from > > > being built into my war. > > > > > > Lets say my war depends on artifactA and artifactB with a scope of > > compile. > > > artifactA depends on log4j > > > artifactB depends on the servlet api > > > > > > I want to include artifactA and artifactB in the war but don't want to > > > include log4j or the servlet api because they are provided by the > > container > > > (jboss). > > > > > > I realise I can do this using an <exclusions> element inside my > > > <dependency>s but this requires me to exclude log4j from A and servlet > > from > > > B. > > > This gets more complicated when I depend on many more artifacts with > > many > > > more dependencies. > > > > > > I'd like a way to globally exclude log4j and servlet from all > > > dependencies... is there a way to do this? > > > > > > > > > Try redeclaring the dependency with scope=provided. > > > > Regards, > > > > Simon > > > > > > > > --------------------------------------------------------------------- > > 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]
