maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schulte (JIRA)" <>
Subject [jira] [Commented] (MNG-5971) Imported dependencies should be available to inheritance processing
Date Tue, 23 Feb 2016 14:31:18 GMT


Christian Schulte commented on MNG-5971:

Thanks for testing. That's the conflicts I am referring to. Looking at {{spring-cloud-dependencies-Brixton.M5.pom}}
I noticed this comment

<!-- bom dependencies at the bottom so they can be overridden above -->

You really rely on the order of {{<dependency>}} elements in the dependency management
intentionally and on that reversed order above overrides below? Can you grab a recent 3.4.0-SNAPSHOT
please to see if the updated warning messages make it clear what is going on? Currently these
warnings are intentional. I am not sure it is/was a good idea to make things rely on the order
of XML elements. That behaviour can be restored and those warnings can be suppressed. Do you
really think that is a good idea? Having Maven resolve those conflicts automatically would
be cool. If that is only possible based on the order of XML elements I think forcing users
to resolve those conflicts manually based on real coordinates is a better way to go. That
isn't set in stone yet.

> Imported dependencies should be available to inheritance processing
> -------------------------------------------------------------------
>                 Key: MNG-5971
>                 URL:
>             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:
> 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:
> 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

View raw message