I am using the buildnumber-maven-plugin in my parent pom to create a build number. This works fine. However, I need to have the ${buildNumber} property in my child. I have added antrun ECHO for that property in my child and it is not there. How can I propagated that property down to children?
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<inherited>false</inherited>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<buildNumberPropertiesFileLocation>buildnumber.properties</buildNumberPropertiesFileLocation>
<format>{0,number,integer}</format>
<items>
<item>buildNumber0</item>
</items>
</configuration>
</plugin>
I found the issue. This may be a bug in the build number plug in. The property I use for the build number (the default name or one I set) does not get propagated down to the child project unless I add in
<getRevisionOnlyOnce>true</getRevisionOnlyOnce>
After adding this line in my pom for the build number plugin, all worked fine. Seems like if you don't have this line in the pom for that plugin it whips out the build number property upon completion of the Parent. Not sure. But all is working now.