I don't know for certain if this is gonna work, but you can give it a try:

        <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>
                  </configuration>
                </execution>
                <execution>
                    <id>generate-timestamp</id>
                    <phase>validate</phase>
                    <goals>
                        <goal>create</goal>
                    </goals>
                    <configuration>
                        <format>{0,date,EEE MMM d HH:mm z yyyy}</format>
                        <items>
                          <item>timestamp</item>
                       </items>
                    </configuration>
                </execution>
            </executions>
        </plugin>

Hth,

Nick S.

-----Original Message-----
From: Rex Huang [mailto:[EMAIL PROTECTED]
Sent: Tue 3/11/2008 13:27
To: Maven Users List
Subject: Re: how to use buildnumber-maven-plugin
 
how can I use both buildNumber and timestamp?

but I had just set the buildNumber as below:
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>buildnumber-maven-plugin</artifactId>
            <executions>
                <execution>
                    <phase>validate</phase>
                    <goals>
                        <goal>create</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <format>{0,number}</format>
                <items>
                    <item>buildNumber0</item>
                </items>
            </configuration>
        </plugin>

then I don't know how to set the timestamp now, because it can't set two of
them, I want to set the timestamp as below:
            <configuration>
                <format>{0,date,EEE MMM d HH:mm z yyyy}</format>
                <items>
                    <item>timestamp</item>
                </items>
            </configuration>

but how can I do that?

Reply via email to