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) Dependency management in a child project cannot override a version using a BOM
Date Wed, 17 Feb 2016 17:54:18 GMT


Christian Schulte commented on MNG-5971:

Please take a look at [DefaultModelBuilder around line 376 to 409|;a=blob;f=maven-model-builder/src/main/java/org/apache/maven/model/building/;h=d42bfddf88c7f205dbe037f2217c590202a490d5;hb=HEAD#l376].
As I understand the issue, you want the  [import|;a=blob;f=maven-model-builder/src/main/java/org/apache/maven/model/building/;h=d42bfddf88c7f205dbe037f2217c590202a490d5;hb=HEAD#l454]
to be performed into the intermediate model (included where it is declared) so that those
imported values are available to inheritance processing. Did I get that correctly?

> Dependency management in a child project cannot override a version using a BOM
> ------------------------------------------------------------------------------
>                 Key: MNG-5971
>                 URL:
>             Project: Maven
>          Issue Type: Wish
>          Components: Dependencies
>    Affects Versions: 3.3.3
>            Reporter: Stephane Nicoll
>            Priority: Trivial
>              Labels: close-pending
> 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