You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/12/14 08:46:46 UTC

[jira] [Commented] (MNG-5947) dependencyManagement import section does not resolve dependencies using "nearest" definition

    [ https://issues.apache.org/jira/browse/MNG-5947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15055584#comment-15055584 ] 

ASF GitHub Bot commented on MNG-5947:
-------------------------------------

GitHub user akacme opened a pull request:

    https://github.com/apache/maven/pull/73

    [MNG-5947] dependencyManagement import section does not resolve dependencies using "nearest" definition

    dependencies using "nearest" definition
    
    o DepenencyManagement model updated to contain declared dependencies 
      and imported dependency managements
    o DefaultModelBuilder responsible for filling updated
      DependencyManagement model
    o DefaultDepenendcyManagementImporter uses graph of dependencyManagement
      imports to properly find depth of a dependency in a tree and use
      "nearest" version (instead of first match)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/akacme/maven MNG-5947

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/maven/pull/73.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #73
    
----
commit 71c7195e130c73d9e67fd5d55b4f963499951781
Author: Michal Kowalcze <mi...@smart4aviation.aero>
Date:   2015-12-14T07:19:33Z

    [MNG-5947] dependencyManagement import section does not resolve
    dependencies using "nearest" definition
    
    o DepenencyManagement model updated to contain declared dependencies 
      and imported dependency managements
    o DefaultModelBuilder responsible for filling updated
      DependencyManagement model
    o DefaultDepenendcyManagementImporter uses graph of dependencyManagement
      imports to properly find depth of a dependency in a tree and use
      "nearest" version (instead of first match)

----


> dependencyManagement import section does not resolve dependencies using "nearest" definition
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-5947
>                 URL: https://issues.apache.org/jira/browse/MNG-5947
>             Project: Maven
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 3.3.3
>            Reporter: MichaƂ Kowalcze
>         Attachments: MNG-5947-maven-model-maven-model-builder.patch, MNG-5947-poms.tgz
>
>
> While resolving dependencies for dependencyManagement version of a particular dependency is determined using "first match", not "nearest" definition.
> Assuming that we have:
> * parent:3.2.1:pom with commons-collections:3.2.1 in dependencyManagement
> * parent:3.2.2:pom with commons-collections:3.2.2 in dependencyManagement
> * imported:1.0:pom with dependencyManagement importing parent:3.21
> * final:1.0:pom with dependencyManagement importing imported:1.0 and parent:3.2.2
> then dependency version for commons-collections in the final POM is set to 3.2.1 (as import 1.0 / parent 3.2.1 is first match), not 3.2.2 which is nearer (one level of import vs. two levels for 3.2.1).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)