[ https://issues.apache.org/jira/browse/MNG-5890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14805033#comment-14805033 ]
Hervé Boutemy commented on MNG-5890: ------------------------------------ to show the problem, I think we could extend "mvn help:effective-pom" to not display effective pom of current pom.xml in reactor but effective pom of any gav coordinates, which would be loaded from repo if you keep that demo in mind, you'll see that ${root} cannot be defined in the second case, or we must do something the code is in maven-model-builder http://maven.apache.org/components/ref/3-LATEST/maven-model-builder/ more precisely in Model Interpolation http://maven.apache.org/components/ref/3-LATEST/maven-model-builder/#Model_Interpolation it's easy to create a branch and do some implementation tests to show the issue: perhaps we can find a solution with an appropriate convention, like I did in MNG-5878 > In reactor projects, having a "root" counterpart to "project" properties > would be useful > ---------------------------------------------------------------------------------------- > > Key: MNG-5890 > URL: https://issues.apache.org/jira/browse/MNG-5890 > Project: Maven > Issue Type: Improvement > Components: Bootstrap & Build, core, General > Affects Versions: 3.3.3 > Reporter: Jordan Zimmerman > > Often, in reactor builds, modules need to refer to properties relative to the > root pom. E.g.: > {noformat} > root-pom.xml > \___ module1-pom.xml > \___ sub-module1-pom.xml > \___ module2-pom.xml > \___ sub-module2-pom.xml > {noformat} > In this example, there's no way to set a dependency in the root pom that uses > the root pom's parent version. This is because $\{project.parent.version\} > will be evaluated relatively in module1/2 and sub-module1/2. In module1/2, it > will refer to the root's parent. But, in sub-module1/2 it will refer only to > the root. > Ideally, we could do something like this: > {code:type=xml} > <parent> > <groupId>my.group</groupId> > <artifactId>foo</artifactId> > <version>1.2.3</version> > </parent> > <dependencyManagement> > <dependencies> > <dependency> > <groupId>my.group</groupId> > <artifactId>a-different-artifact-in-my.group</artifactId> > <version>${root.parent.version}</version> > </dependency> > </dependencies> > </dependencyManagement> > {code} > With this "root" feature, $\{root.parent.version\} would refer to the same > value at every level of the reactor build. -- This message was sent by Atlassian JIRA (v6.3.4#6332)