maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MNG-4347) import-scoped dependencies of direct dependencies are not resolved using profile modifications from settings.xml
Date Fri, 16 Feb 2018 18:01:00 GMT

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

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

GitHub user clarkperkins opened a pull request:

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

    Bugfix/mng 4347 recursive imports

    …resolved using profile modifications from settings.xml
    
    o Updated the 'DefaultModelResolver' to handle replacing repositories the same way the
      'DefaultDependencyCollector' does. When the 'DefaultDependencyCollector' finds
      a repository in a child node with an id matching a repository already in use,
      it will only merge any mirror definitions but never change the repository already
      in use. The 'DefaultModelResolver' needs to follow the same logic. What has been
      provided must not change for consistency.
    
    Cherry-picked from @ChristianSchulte's fork, per comment on the MNG-4347 ticket.  I made
the same changes to the ProjectModelResolver, since it seems that's the implementation that's
getting used by the dependencyManagement import resolution rather than the DefaultModelResolver.

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

    $ git pull https://github.com/clarkperkins/maven bugfix/MNG-4347-recursive-imports

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

    https://github.com/apache/maven/pull/159.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 #159
    
----
commit c1f3bee77783a1f3349083e431dd4bb7cd7f290a
Author: Christian Schulte <schulte@...>
Date:   2016-12-13T02:30:32Z

    [MNG-4347] import-scoped dependencies of direct dependencies are not resolved using profile
modifications from settings.xml
    
    o Updated the 'DefaultModelResolver' to handle replacing repositories the same way the
      'DefaultDependencyCollector' does. When the 'DefaultDependencyCollector' finds
      a repository in a child node with an id matching a repository already in use,
      it will only merge any mirror definitions but never change the repository already
      in use. The 'DefaultModelResolver' needs to follow the same logic. What has been
      provided must not change for consistency.

commit f8ab4e1e37479d353fd4a6d20442aa29c6ad8899
Author: Clark Perkins <clark.perkins@...>
Date:   2018-02-16T17:59:07Z

    Made the same changes to ProjectModelResolver

----


> import-scoped dependencies of direct dependencies are not resolved using profile modifications
from settings.xml
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-4347
>                 URL: https://issues.apache.org/jira/browse/MNG-4347
>             Project: Maven
>          Issue Type: Bug
>          Components: Artifacts and Repositories, Dependencies, General, Profiles, Settings
>    Affects Versions: 2.2.1
>            Reporter: John Casey
>            Priority: Critical
>             Fix For: 2.2.2, 3.5.x-candidate
>
>
> Given:
> * project A lists project B as a dependency
> * project B lists project C as an import-scoped entry in dependencyManagement
> * project B's dependency version for project C is a SNAPSHOT
> * the user's settings.xml file modifies the definition of the central repository to enable
searching for SNAPSHOT artifacts.
> When project A's dependency POMs are retrieved as part of collecting the transitive dependency
closure for A, B's project instance is built. During this process, the POM for project C should
be retrieved from central (according to the modifications in settings.xml). However, the profile
information from the settings.xml is never applied to project B's POM, and never modifies
the central repository definition found there. Since the default definition for the repository
'central' from the super POM has snapshots disabled, project C's POM cannot be found, and
the build fails.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message