[ 
http://jira.codehaus.org/browse/MNG-2340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_99682
 ] 

Kenney Westerhof commented on MNG-2340:
---------------------------------------

Maven 2.0.6 and 2.0.7 do it like this:
- depMgt provides defaults; so if a child pom declares a dependency present in 
depMgt, with a different version, the version from the child pom is used.

Maven 2.0.4 and 2.0.5 do it like this:
- depMgt provides OVERRIDES, so if a child pom declares a dependency present in 
depMgt, with a different version, the version from depMgt is used.

The difference probably is that you use the commandline version of maven, 2.0.4 
or 2.0.5, and in eclipse you use the embedder which is based
on 2.1, and uses the same approach as 2.0.6 and 2.0.7.

I think that when you use the commandline version 2.0.6 or newer, you'll see 
that m2eclipse and maven commandline both use the same approach.


> Incorrect dependency version downloaded
> ---------------------------------------
>
>                 Key: MNG-2340
>                 URL: http://jira.codehaus.org/browse/MNG-2340
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Embedding
>    Affects Versions: 2.0.4
>            Reporter: Adrian
>            Priority: Critical
>             Fix For: 2.1.x
>
>         Attachments: MNGECLIPSE-131.zip
>
>
> I have a parent pom with a dependency management section specifying the 
> version of an artifact to use. In the child project, I override this version.
> The maven plugin ignores the overriding version and downloads the version 
> specified by the parent pom.
> For example, in the parent pom
> {code}
> <dependency>
>       <groupId>lucene</groupId>
>       <artifactId>lucene</artifactId>
>       <version>1.4.3</version>
> </dependency>
> {code}
> in the project pom, inheriting the parent pom
> {code}
> <dependency>
>       <groupId>lucene</groupId>
>       <artifactId>lucene</artifactId>
>       <version>2.0</version>
> </dependency>
> {code}
> The maven eclipse plugin downloads version 1.4.3 for my project

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to