2

I have a multi parent project (child with grandparent pom). The grandparent pom specifies a variable (happens to be the version) that gets overridden by the child. How can I get that value to either be static or reference the "top" parent?

realizing this may need clarification

Let's say that our grandparent pom is

<groupId>group</groupId>
<artifactId>grandparent-pom</artifactId>
<version>1.3-SNAPSHOT</version>
<properties>
    <grandparent-pom-version>${version}</grandparent-pom-version>
</properties>

This puts the un-substituted variable in the installed pom file, so everything that inherits from it is substituting the local value. One alternative is to look back at the parent ${parent.version}, but this gets lost once we hit the third generation.

end-user
  • 2,845
  • 6
  • 30
  • 56
  • 1
    I had a similar need and ended up [using the `gmaven-plugin`](http://stackoverflow.com/a/15962647/944849). – user944849 Aug 06 '13 at 13:27

0 Answers0