You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Christian Schulte (JIRA)" <ji...@apache.org> on 2018/01/29 10:27:00 UTC

[jira] [Closed] (MNG-6161) Dependencies' management via import should take precedence over inherited definitions

     [ https://issues.apache.org/jira/browse/MNG-6161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schulte closed MNG-6161.
----------------------------------
    Resolution: Duplicate

> Dependencies' management via <scope>import</scope> should take precedence over inherited definitions
> ----------------------------------------------------------------------------------------------------
>
>                 Key: MNG-6161
>                 URL: https://issues.apache.org/jira/browse/MNG-6161
>             Project: Maven
>          Issue Type: Improvement
>          Components: Dependencies
>    Affects Versions: 3.3.9
>         Environment: Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T16:41:47+00:00)
> Maven home: /usr/local/Cellar/maven/3.3.9/libexec
> Java version: 1.8.0_60, vendor: Oracle Corporation
> Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre
> Default locale: en_GB, platform encoding: UTF-8
> OS name: "mac os x", version: "10.12.2", arch: "x86_64", family: "mac"
>            Reporter: Daniel McGreal
>            Priority: Major
>
> Hi, I would like to suggest an improvement to the way in which <scope>import</scope> dependencies are handled.
> Currently, if I have four projects:
> * 'version' which sets a dependency on X with a version of Y, and is a parent pom
> * 'depender' which inherits from 'version' and declares a dependency on X
> * 'provider' which manages X to scope provided
> * 'last' which depends on 'depender' and imports 'provider's managed dependencies
> then the 'provider' definition is ignored and 'version's is chosen.
> The use case I'm trying to achieve is where some dependencies are excluded from a plugin's activities, and using <scope>provided</scope> is the best way for me to achieve this. Using <scope>import</scope> to override hierarchically defined dependency management would be a nice way of organising this in a way that supports the multi-tired architecture my real use case would require.
> In short, it feels to me that a <dependencyManagement> definition with <scope>import</scope> should be 'closer' to the current bundle's dependency resolution than its parents.
> Thanks for your consideration,
> Dan.



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