Reputation: 1438
How to rename buildNumber property name in buildnumber-maven-plugin
as mentioned in: http://mojo.codehaus.org/buildnumber-maven-plugin/create-mojo.html#buildNumberPropertyName
buildNumberPropertyName:
You can rename the buildNumber property name to another property name if desired. Type: java.lang.String Since: 1.0-beta-1 Required: No User Property: maven.buildNumber.buildNumberPropertyName Default: buildNumber
Upvotes: 1
Views: 841
Reputation: 29
in the configuration of maven buildnumber plugin, specify the optional attribute : “buildNumberPropertyName” with the custom name.
Upvotes: 0
Reputation: 1520
Just as you quote. You have to use property buildNumberPropertyName
. For ex:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.3</version>
<inherited>true</inherited>
<executions>
<execution>
<id>generate-timestamp</id>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
<configuration>
<format>{0,date,yyyy-MM-dd HH:mm:ss Z}</format>
<items>
<item>timestamp</item>
</items>
<buildNumberPropertyName>buildDateTime</buildNumberPropertyName>
</configuration>
</execution>
</executions>
Using above configuration, build time will be visible as ${buildDateTime}
maven property. Don't worry if your IDE will complaining about that it doesn't see creation of this property.
You can use default name as well: ${buildNumber}
Upvotes: 3