In maven multimodule project, there is a submodule that needs to inherit from external parent project. Therefore it cannot inherit from the parent module as other submodules, and those cannot inherit that external parent (so making the external project the parent of the entire hierarchy is not an option).
Is there a way to eliminate the duplication of properties between such module and the rest of the hierarchy?
parent
pom.xml
<properties>
<foo>bar</foo>
</properties>
<modules>
<module>child</module>
<module>stepchild</module>
</modules>
child
pom.xml
<parent>
<groupId>my</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<description>foo can be used: ${foo}</description>
stepchild
pom.xml
<parent>
<groupId>external</groupId>
<artifactId>parent</artifactId>
<version>35</version>
<relativePath/>
</parent>
<description>foo does not get substituted: ${foo}</description>