Hi,

I have a large project which comprises of many modules and sub-modules and
inheritance structure....


   root
    +--- Module 1
            +-- Module 1.1
    +--- Module 2
            +-- Module 2.1



Now i would like to get the SCM Version with the buildnumber-maven-plugin
which works....and i've tried to create a timestamp with
buildnumber-maven-plugin....

But now the problem arises....In every module the buildnumber-maven-plugin
will be executed which means the timestamp changes over the different
modules....

I have configured the buildnumber-maven-plugin in my Root Module:



     <build>
        <plugins>
          <plugin>
                <groupId>org.codehaus.mojo</groupId>
               
<artifactId>buildnumber-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>buildNumber-scm</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                        <configuration>
                           
<getRevisionOnce>true</getRevisionOnce>
                            <doCheck>false</doCheck>
                            <doUpdate>false</doUpdate>
                        </configuration>
                    </execution>
                    <execution>
                        <id>buildNumberTimeStamp</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                        <configuration>
                           
<buildNumberPropertyName>buildTimeStamp</buildNumberPropertyName>
                            <format>{0,date,yyyy-MM-dd
HH:mm:ss}</format>
                            <items>
                                <item>timestamp</item>
                            </items>
                            <doCheck>false</doCheck>
                            <doUpdate>false</doUpdate>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
....


So what i need is to create a timestamp only once during a build....(e.g. on
Root-Level) ?

Is this possible with Maven (2.2.1 / 3.0 - Alpha ...).

Or might be the best way to create such a timestamp via CI Server (in my
case Hudson)?

Kind regards
Karl Heinz Marbaise
-- 
View this message in context: 
http://old.nabble.com/Problem-with-buildnumber-maven-plugin-tp27228183p27228183.html
Sent from the Maven - Users mailing list archive at Nabble.com.

Reply via email to