maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alireza Ghassemi (JIRA)" <>
Subject [jira] [Created] (MNG-6663) overriding parent dependency management doesn't work for transitive dependencies
Date Tue, 28 May 2019 13:36:00 GMT
Alireza Ghassemi created MNG-6663:

             Summary: overriding parent dependency management doesn't work for transitive
                 Key: MNG-6663
             Project: Maven
          Issue Type: Bug
          Components: Dependencies
    Affects Versions: 3.6.1
            Reporter: Alireza Ghassemi
         Attachments: pom.xml

overriding the dependencies of a parent POM is possible by setting the dependency version
explicitly in the child POM which makes sense; since a parent POM is "suggesting" dependency
versions for children that don't know which version to use and a child that knows exactly
which version they need can ignore their parents "suggestion". however that is not the case
for transitive dependencies of the dependency explicitly versioned in the child and since
'kotlin-stdlib-jdk8:1.3.31' was compiled with 'kotlin-stdlib:1.3.31' runtime exceptions will
happen; yet nobody needs 'kotlin-stdlib:1.2.71'

example POM:


mvn dependency:tree output:

[INFO] \- org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:1.3.31:compile
[INFO]    +- org.jetbrains.kotlin:kotlin-stdlib:jar:1.2.71:compile
[INFO]    |  +- org.jetbrains.kotlin:kotlin-stdlib-common:jar:1.2.71:compile
[INFO]    |  \- org.jetbrains:annotations:jar:13.0:compile
[INFO]    \- org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:1.2.71:compile


[INFO] \- org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:1.3.31:compile
[INFO]    +- org.jetbrains.kotlin:kotlin-stdlib:jar:1.3.31:compile
[INFO]    |  +- org.jetbrains.kotlin:kotlin-stdlib-common:jar:1.3.31:compile
[INFO]    |  \- org.jetbrains:annotations:jar:13.0:compile
[INFO]    \- org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:1.3.31:compile

This message was sent by Atlassian JIRA

View raw message