maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephane Nicoll (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MNG-5971) Imported dependencies should be available to inheritance processing
Date Tue, 23 Feb 2016 13:36:18 GMT

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

Stephane Nicoll commented on MNG-5971:
--------------------------------------

{noformat}
Apache Maven 3.4.0-SNAPSHOT (24e792188260ffd41278555c9452c2a91e2acb3d; 2016-02-22T03:48:56+01:00)
Maven home: /Users/snicoll/tools/maven
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_US, platform encoding: UTF-8
OS name: "Mac OS X", version: "10.11.3", arch: "x86_64", family: "Unix"
{noformat}

Is the following warnings a direct effect of this change? 

{noformat}
➜ mvn dependency:list
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.example:demo:jar:0.0.1-SNAPSHOT
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: org.springframework.integration:spring-integration-http:jar -> duplicate
declaration of version 4.2.4.RELEASE @ org.springframework.boot:spring-boot-dependencies:1.3.2.RELEASE,
/Users/snicoll/.m2/repository/org/springframework/boot/spring-boot-dependencies/1.3.2.RELEASE/spring-boot-dependencies-1.3.2.RELEASE.pom,
line 1803, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: org.apache.httpcomponents:httpclient:jar -> version 4.5 vs 4.5.1 @ org.springframework.boot:spring-boot-dependencies:1.3.2.RELEASE,
/Users/snicoll/.m2/repository/org/springframework/boot/spring-boot-dependencies/1.3.2.RELEASE/spring-boot-dependencies-1.3.2.RELEASE.pom,
line 1071, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: org.apache.httpcomponents:httpclient:jar -> version 4.5 vs 4.5.1 @ org.springframework.boot:spring-boot-dependencies:1.3.2.RELEASE,
/Users/snicoll/.m2/repository/org/springframework/boot/spring-boot-dependencies/1.3.2.RELEASE/spring-boot-dependencies-1.3.2.RELEASE.pom,
line 1071, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: org.apache.httpcomponents:httpclient:jar -> version 4.5 vs 4.5.1 @ org.springframework.boot:spring-boot-dependencies:1.3.2.RELEASE,
/Users/snicoll/.m2/repository/org/springframework/boot/spring-boot-dependencies/1.3.2.RELEASE/spring-boot-dependencies-1.3.2.RELEASE.pom,
line 1071, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: org.apache.httpcomponents:httpclient:jar -> version 4.5 vs 4.5.1 @ org.springframework.boot:spring-boot-dependencies:1.3.2.RELEASE,
/Users/snicoll/.m2/repository/org/springframework/boot/spring-boot-dependencies/1.3.2.RELEASE/spring-boot-dependencies-1.3.2.RELEASE.pom,
line 1071, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: org.apache.httpcomponents:httpclient:jar -> version 4.5 vs 4.5.1 @ org.springframework.boot:spring-boot-dependencies:1.3.2.RELEASE,
/Users/snicoll/.m2/repository/org/springframework/boot/spring-boot-dependencies/1.3.2.RELEASE/spring-boot-dependencies-1.3.2.RELEASE.pom,
line 1071, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: org.apache.httpcomponents:httpcore:jar -> version 4.4.1 vs 4.4.4 @ org.springframework.boot:spring-boot-dependencies:1.3.2.RELEASE,
/Users/snicoll/.m2/repository/org/springframework/boot/spring-boot-dependencies/1.3.2.RELEASE/spring-boot-dependencies-1.3.2.RELEASE.pom,
line 1082, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: org.apache.httpcomponents:httpcore:jar -> version 4.4.1 vs 4.4.4 @ org.springframework.boot:spring-boot-dependencies:1.3.2.RELEASE,
/Users/snicoll/.m2/repository/org/springframework/boot/spring-boot-dependencies/1.3.2.RELEASE/spring-boot-dependencies-1.3.2.RELEASE.pom,
line 1082, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: org.apache.httpcomponents:httpcore:jar -> version 4.4.1 vs 4.4.4 @ org.springframework.boot:spring-boot-dependencies:1.3.2.RELEASE,
/Users/snicoll/.m2/repository/org/springframework/boot/spring-boot-dependencies/1.3.2.RELEASE/spring-boot-dependencies-1.3.2.RELEASE.pom,
line 1082, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: org.apache.httpcomponents:httpcore:jar -> version 4.4.1 vs 4.4.4 @ org.springframework.boot:spring-boot-dependencies:1.3.2.RELEASE,
/Users/snicoll/.m2/repository/org/springframework/boot/spring-boot-dependencies/1.3.2.RELEASE/spring-boot-dependencies-1.3.2.RELEASE.pom,
line 1082, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: org.apache.httpcomponents:httpcore:jar -> version 4.4.1 vs 4.4.4 @ org.springframework.boot:spring-boot-dependencies:1.3.2.RELEASE,
/Users/snicoll/.m2/repository/org/springframework/boot/spring-boot-dependencies/1.3.2.RELEASE/spring-boot-dependencies-1.3.2.RELEASE.pom,
line 1082, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: joda-time:joda-time:jar -> version 2.7 vs 2.8.2 @ org.springframework.boot:spring-boot-dependencies:1.3.2.RELEASE,
/Users/snicoll/.m2/repository/org/springframework/boot/spring-boot-dependencies/1.3.2.RELEASE/spring-boot-dependencies-1.3.2.RELEASE.pom,
line 847, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: joda-time:joda-time:jar -> version 2.7 vs 2.8.2 @ org.springframework.boot:spring-boot-dependencies:1.3.2.RELEASE,
/Users/snicoll/.m2/repository/org/springframework/boot/spring-boot-dependencies/1.3.2.RELEASE/spring-boot-dependencies-1.3.2.RELEASE.pom,
line 847, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: joda-time:joda-time:jar -> version 2.7 vs 2.8.2 @ org.springframework.boot:spring-boot-dependencies:1.3.2.RELEASE,
/Users/snicoll/.m2/repository/org/springframework/boot/spring-boot-dependencies/1.3.2.RELEASE/spring-boot-dependencies-1.3.2.RELEASE.pom,
line 847, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: joda-time:joda-time:jar -> version 2.7 vs 2.8.2 @ org.springframework.boot:spring-boot-dependencies:1.3.2.RELEASE,
/Users/snicoll/.m2/repository/org/springframework/boot/spring-boot-dependencies/1.3.2.RELEASE/spring-boot-dependencies-1.3.2.RELEASE.pom,
line 847, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: joda-time:joda-time:jar -> version 2.7 vs 2.8.2 @ org.springframework.boot:spring-boot-dependencies:1.3.2.RELEASE,
/Users/snicoll/.m2/repository/org/springframework/boot/spring-boot-dependencies/1.3.2.RELEASE/spring-boot-dependencies-1.3.2.RELEASE.pom,
line 847, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: org.springframework:spring-core:jar -> duplicate declaration of version
4.2.4.RELEASE @ org.springframework.boot:spring-boot-dependencies:1.3.2.RELEASE, /Users/snicoll/.m2/repository/org/springframework/boot/spring-boot-dependencies/1.3.2.RELEASE/spring-boot-dependencies-1.3.2.RELEASE.pom,
line 1706, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: com.hazelcast:hazelcast:jar -> version 3.5.4 vs 3.3 @ org.springframework.cloud:spring-cloud-cluster-dependencies:1.0.0.M4,
/Users/snicoll/.m2/repository/org/springframework/cloud/spring-cloud-cluster-dependencies/1.0.0.M4/spring-cloud-cluster-dependencies-1.0.0.M4.pom,
line 64, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: com.hazelcast:hazelcast-spring:jar -> version 3.5.4 vs 3.3 @ org.springframework.cloud:spring-cloud-cluster-dependencies:1.0.0.M4,
/Users/snicoll/.m2/repository/org/springframework/cloud/spring-cloud-cluster-dependencies/1.0.0.M4/spring-cloud-cluster-dependencies-1.0.0.M4.pom,
line 69, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: org.aspectj:aspectjrt:jar -> version 1.8.8 vs 1.8.4 @ org.springframework.cloud:spring-cloud-sleuth-dependencies:1.0.0.M5,
/Users/snicoll/.m2/repository/org/springframework/cloud/spring-cloud-sleuth-dependencies/1.0.0.M5/spring-cloud-sleuth-dependencies-1.0.0.M5.pom,
line 66, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: org.aspectj:aspectjweaver:jar -> version 1.8.8 vs 1.8.4 @ org.springframework.cloud:spring-cloud-sleuth-dependencies:1.0.0.M5,
/Users/snicoll/.m2/repository/org/springframework/cloud/spring-cloud-sleuth-dependencies/1.0.0.M5/spring-cloud-sleuth-dependencies-1.0.0.M5.pom,
line 71, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: org.apache.curator:curator-recipes:jar -> version 2.9.1 vs 2.8.0 @ org.springframework.cloud:spring-cloud-cluster-dependencies:1.0.0.M4,
/Users/snicoll/.m2/repository/org/springframework/cloud/spring-cloud-cluster-dependencies/1.0.0.M4/spring-cloud-cluster-dependencies-1.0.0.M4.pom,
line 54, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)'
must be unique: org.apache.curator:curator-test:jar -> version 2.9.1 vs 2.8.0 @ org.springframework.cloud:spring-cloud-cluster-dependencies:1.0.0.M4,
/Users/snicoll/.m2/repository/org/springframework/cloud/spring-cloud-cluster-dependencies/1.0.0.M4/spring-cloud-cluster-dependencies-1.0.0.M4.pom,
line 59, column 16
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability
of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed
projects.
[WARNING]
{noformat}

To reproduce, just build the attached project. If that's unrelated, apologizes and I'll create
a separate issue. 
 

> Imported dependencies should be available to inheritance processing
> -------------------------------------------------------------------
>
>                 Key: MNG-5971
>                 URL: https://issues.apache.org/jira/browse/MNG-5971
>             Project: Maven
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 3.3.3
>            Reporter: Stephane Nicoll
>            Assignee: Christian Schulte
>            Priority: Trivial
>              Labels: close-pending
>             Fix For: 3.4.0
>
>         Attachments: bom-cloud.zip
>
>
> When a project extends from a parent with a {{dependencyManagement}} section, it is not
always possible to properly override (and align) the version to use for a group of dependencies.
> We typically use Bill Of Materials to gather a group of modules and make sure their versions
are consistent. 
> The following project demonstrates the issue: https://github.com/snicoll-scratches/maven-dependency-management
> The first commit is a working use case where the parent uses a bom with version A and
we use the same bom with version B in the child. Version B is used as expected.
> The second commit demonstrates the faulty scenario. Rather than using a bom in the parent,
we use a direct dependency (provided by that bom). We still use the bom with a different version.
In that case all the dependencies but the one provided by the parent are overridden (leading
to mixed versions for the dependencies provided by the BOM).
> It looks like the distance is still used to compute the version while the graph of dependencies
should be flatten at each step for a proper override. 
> Thoughts? Thanks!



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

Mime
View raw message