Here's an excerpt from Maven docs about how it should work :
dependencyManagement: is used by POMs to help manage dependency information
across all of its children. If the my-parent project uses
dependencyManagement to define a dependency on junit:junit:4.0, then POMs
inheriting from this one can set their dependency giving the groupId=junit
and artifactId=junit only, then Maven will fill in the version set by the
parent. The benefits of this method are obvious. Dependency details can be
set in one central location, which will propagate to all inheriting POMs. In
addition, the version and scope of artifacts which are incorporated from
transitive dependencies may also be controlled by specifying them in a
dependency management section.



webhiker wrote:
> 
> Stephen, I don't think you are correct, it IS supposed to be used that
> way, and that's what all the Maven documentation lists as examples and
> operating behaviour :
> 
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
> 
> I'm having the exact same issue. Using identical examples to the Maven
> docs, if I omit the version tag in the child pom, the build always fails
> with "missing version tag" error.
> 
> There appears to be something wrong with the code. I'm running Maven 2.0.9
> 
> 
> Stephen Connolly-2 wrote:
>> 
>> Each project can list _only the dependencies that it has_ while using the
>> import to ensure that only a single suite of dependency versions are
>> used, I
>> would guess.
>> 
>> It's to separate inheritance from dependency management
>> 
>> On Tue, Sep 16, 2008 at 4:25 PM, Barry Kaplan <[EMAIL PROTECTED]>
>> wrote:
>> 
>>>
>>> What is the value of importing into dependencyManagement if those
>>> dependencies cannot then be refered to in the regular dependencies? I'm
>>> missing the purpose/value.
>>> --
>>> View this message in context:
>>> http://www.nabble.com/scope-import-and-dependencyManagement-tp19512161p19514217.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]
>>>
>>>
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/scope-import-and-dependencyManagement-tp19512161p19795572.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]

Reply via email to