What this is is another dependency with a more inclusive scope down the chain.
While the behaviour is correct, it is not intuitive. Anyone have a preferred option? 1) Log a warning when a higher priority scope is found in the chain 2) scope in end POM always wins 3) same as 2, but only when it is "provided" 4) keep it as is (where you can use <dependencyManagement /> to force the appropriate scope) I'm in favour of doing (1) regardless. If that isn't obvious enough we can do (2), but my preference remains to be (4). - Brett Stephane Nicoll wrote: >On 7/23/05, solo turn <[EMAIL PROTECTED]> wrote: > >>somehow i do not understand that, i tried: >> >> <dependencies> >> <dependency> >> ... >> <scope>provided</scope> >> </dependency> >> >>and it still includes it into the war. is this a bug in the war >>plugin? > > >I don't think so. I have also seen strange behavior with the >dependencies's scope. The war plugin takes the dependency if it's >neither test, nor provided. Put m2 in debug mode with the -X flag to >see more details. > >Namely, JUnit with scope test is included in an EAR file even if it >should not be. I suspect the scope to be 'null' in both cases. I'll >check Jira and file a new bug if necessary (but I need to check this >first). > >Cheers, >Stéphane > > >if i make a type, like "prod" instead of "provided", it still > >>works and packs it into the war. >> >>-solo >> >>On 7/20/05, Brett Porter <[EMAIL PROTECTED]> wrote: >> > see "provided" on that page. > > solo turn wrote: > > >hi, > > >how shared libraries are handled by the maven dependency management, > >with respect to the following areas: > >* compile: > >seems to be perfect > >* eclipse (create an eclipse project referencing libraries) > >not sure, but works > >* install (build a war, ear) > >i have no idea how to declare a dependency as > >"shared library" so it does not get included in the deliverable > > >could you please explain how you specify "shared libraries" in the pom > >file, so they do not get inlcuded when building a war? maybe on > >http://maven.apache.org/maven2/dependencies.html. > > >-solo > > >--------------------------------------------------------------------- > >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]