I see. Thank you. So we can modify version, version an scope, but not, only scope. This is a problem when you only want using it to "upgrade" a dependency to "provided". Then you are also manipulatig the version that should be resolved by Maven.
So it seems its not a good idea using it to exclude a "sticky" transitive dependency that someone has set as compile but in your context is provided, right? Anders Hammar wrote: > > I'm not sure about the optional tag, but it does apply to version. > DependencyManagement is where you can specify the version to use for > transitive dependencies. > http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Management > > /Anders > > > softwarepills wrote: >> >> To clarify more the matter. >> >> Should we think about DependencyManagement no only as a default value >> provider, but also as a modifier of inherited dependencies? >> Does it apply to other parameters like the <version> itself and >> <optional>?. >> >> >> Jörg Schaible-3 wrote: >>> >>> softwarepills wrote: >>>> I usually think in DependencyManagement as a "by default" section, i >>>> mean, the version and scope you set in DependencyManagement is the >>>> version and scope you get if ommited in the real dependency in the POM >>>> and child POMs. >>>> >>>> But, i have found that if i insert provided scope in the >>>> DependencyManagement section, any compile dependency and transitive >>>> compile dependency will be "upgraded" to provided. >>>> >>>> Is this correct? >>> >>> Yes. >>> >>>> Is this the intended behavior? >>> >>> Yes. >>> >>>> If yes, this is a inetresting tool to exclude artifacts form being >>>> packaged, right? >>> >>> Yes. >>> >>> :) >>> >>> You'll need M2.0.6 or greater though ... >>> >>> -Jörg >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/DependencyManagement-to-force-scope-tp19776450p19778474.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
