In Maven 2.
I have a multi-module hierarchy and I would like the parent to be the
only place that the version is defined. However I do not think this
is possible in maven 2. If it is possible please let me know what I
am doing wrong.
Parent pom:
<groupId>com.dummy</groupId>
<artifactId>parent</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
Child pom:
<parent>
<groupId>com.dummy</groupId>
<artifactId>parent</artifactId>
<!--
<version>1.0</version>
-->
</parent>
<groupId>com.dummy</groupId>
<artifactId>kid</artifactId>
Above example will not work as I have to set the version of my parent.
From what I have read I do not think that this is possible in maven
2, but I could have missed something.
I think I can work around this by setting a property in the parent. I
am definitely all ears if there is a better way to accomplish this.
Parent:
<groupId>com.dummy<groupId>
<artifactId>parent</artifactId>
<version>${myversion}</version>
<packaging>pom</packaging>
<properties>
<myversion>1.0</myversion>
</properties>
Child pom:
<parent>
<groupId>com.dummy</groupId>
<artifactId>parent</artifactId>
<version>${myversion}/version>
</parent>
<groupId>com.dummy<groupId>
<artifactId>kid</artifactId>
Thanks again for the help.
Billy
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]