I want a parent pom to define some properties for numerous child poms to inherit. However when I try and use the artifactId within one of these properties in the parent pom, it duplicates in the child's effective pom. Very basic example below. Assume I have all the valid fields needed for poms (groupId, version, packaging etc).
The parent pom's effective pom has a scm connection value of www.mysite.com/parent-pom. But the child's effective pom has a scm connection value of www.mysite.com/child-pom/child-pom. How do I gain this inheritance of the property and general structure of the connection url, without the duplicate artifactId. I want the child pom to have a scm connection of www.mysite.com/child-pom.
Parent:
<project>
<artifactId>parent-pom</artifactId>
<properties>
<scmurl>www.mysite.com</scmurl>
</properties>
<scm>
<connection>${scmurl}/${artifactId}</connection>
</scm>
</project>
Child:
<project>
<parent>
<artifactId>parent-pom</artifactId>
</parent>
<artifactId>child-pom</artifactId>
</project>
${artifactId}to${project.artifactId}. Does it help? - Eldad Assis