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 2016/06/24 01:12:16 UTC

[jira] [Closed] (MNG-5769) Maven is ignoring dependencyManagement for transitive dependencies

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

Christian Schulte closed MNG-5769.
----------------------------------
    Resolution: Duplicate
      Assignee: Christian Schulte

> Maven is ignoring dependencyManagement for transitive dependencies
> ------------------------------------------------------------------
>
>                 Key: MNG-5769
>                 URL: https://issues.apache.org/jira/browse/MNG-5769
>             Project: Maven
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 3.2.5
>            Reporter: Cintia DR
>            Assignee: Christian Schulte
>         Attachments: test-deps.tar.gz
>
>
> Assume that an arbitrary dep-A has a dependencyManagement redefining the version of a transitive dependency (com.github.jnr:jffi). 
> Its dependency:tree looks fine:
> {noformat}
> test-deps/dep-A $ mvn3.2.5 org.apache.maven.plugins:maven-dependency-plugin:2.10:tree
> ...
> [INFO] com.test.deps:depA:jar:1.0-SNAPSHOT
> [INFO] \- com.github.jnr:jnr-ffi:jar:1.0.3:compile
> [INFO]    +- com.github.jnr:jffi:jar:1.2.7:compile
> [INFO]    +- com.github.jnr:jffi:jar:native:1.2.7:runtime    
> [INFO]    +- org.ow2.asm:asm:jar:4.0:compile
> [INFO]    +- org.ow2.asm:asm-commons:jar:4.0:compile
> [INFO]    +- org.ow2.asm:asm-analysis:jar:4.0:compile
> [INFO]    +- org.ow2.asm:asm-tree:jar:4.0:compile
> [INFO]    +- org.ow2.asm:asm-util:jar:4.0:compile
> [INFO]    \- com.github.jnr:jnr-x86asm:jar:1.0.2:compile (version selected from constraint [1.0.2,))
> {noformat}
> But when including dep-A as a compile dependency of proj-B, the dependencyManagement is ignored:
> {noformat}
> test-deps/proj-B $ mvn3.2.5 org.apache.maven.plugins:maven-dependency-plugin:2.10:tree
> ...
> [INFO] com.test.deps:projb:jar:2.0-SNAPSHOT
> [INFO] \- com.test.deps:depA:jar:1.0-SNAPSHOT:compile
> [INFO]    \- com.github.jnr:jnr-ffi:jar:1.0.3:compile
> [INFO]       +- com.github.jnr:jffi:jar:1.2.8-SNAPSHOT:compile (version selected from constraint [1.2.1,1.3.0))
> [INFO]       +- com.github.jnr:jffi:jar:native:1.2.8-SNAPSHOT:runtime (version selected from constraint [1.2.1,1.3.0))
> [INFO]       +- org.ow2.asm:asm:jar:4.0:compile
> [INFO]       +- org.ow2.asm:asm-commons:jar:4.0:compile
> [INFO]       +- org.ow2.asm:asm-analysis:jar:4.0:compile
> [INFO]       +- org.ow2.asm:asm-tree:jar:4.0:compile
> [INFO]       +- org.ow2.asm:asm-util:jar:4.0:compile
> [INFO]       \- com.github.jnr:jnr-x86asm:jar:1.0.2:compile (version selected from constraint [1.0.2,))
> {noformat}
> I would expect both projects to have the same versions of the dependencies. 



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