You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Sergio M C Figueiredo <sm...@yahoo.com.br> on 2009/12/22 15:34:10 UTC

RE: how to use buildnumber-maven-plugin

Thanks Nick. This works to me. Now I have two variables: a build number and a
human readable current date. I only modified your suggestion setting up a
new name for the variables in each execution using "buildNumberPropertyName"
tag:

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>buildnumber-maven-plugin</artifactId>
            <executions>
                <execution>
                    <id>generate-buildnumber</id>
                    <phase>validate</phase>
                    <goals>
                        <goal>create</goal>
                    </goals>
                  <configuration>
                   <format>{0,number}</format>
                     <items>
                        <item>buildNumber0</item>
                     </items>
                    
<buildNumberPropertyName>buildNumberSeq</buildNumberPropertyName>
                  </configuration>
                </execution>
                <execution>
                    <id>generate-timestamp</id>
                    <phase>validate</phase>
                    <goals>
                        <goal>create</goal>
                    </goals>
                    <configuration>
                        <format>{0,date,dd-MM-yyyy}</format>
                        <items>
                          <item>timestamp</item>
                       </items>
                      
<buildNumberPropertyName>buildDate</buildNumberPropertyName>
                    </configuration>
                </execution>
            </executions>
        </plugin>

Now, I can use this data using ${buildDate} and ${buildNumberSeq} instead of
${buildNumber}.

Sergio M C Figueiredo 
(my blog: http://devdelver.wordpress.com/ - in "pt-BR")


Nick Stolwijk wrote:
> 
> I don't know for certain if this is gonna work, but you can give it a try:
> 
> <...>
> 
> Hth,
> 
> Nick S.
> 
> 

-- 
View this message in context: http://old.nabble.com/how-to-use-buildnumber-maven-plugin-tp15875096p26889184.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org