you can attach the scm:tag goal to the install phase in your pom.
With it, you'll can add a timestamp in the tag name.
Emmanuel
John Goyer a écrit :
How do I tag a build on success? I am using maven2 and would like to
make a new tag after each build that succeeds. I would also like to
include a version number (preferred) or date/timestamp in the tag.
only builds in succes have a continuum build number.
Adam Leggett a �crit :
Thanks Emmanuel,
I want to display the build version in the built application. The app is a java
gui installer.
My M2 build binds antrun to package phase which invokes an ant buildfile. The
ant build
reads the version number property and includes it in the application.
Im not looking to define a continuum build number. Im just wondering if all
builds (success
and failure) could be numbered.
Thanks
Adam
-----Original Message-----
From: Emmanuel Venisse [mailto:[EMAIL PROTECTED]
Sent: Friday, June 16, 2006 12:40 PM
To: [email protected]
Subject: Re: Build Version Numbering
it isn't possible actually to define your own build number in continuum. The
build number
generated
by continuum is an internal number.
what is the interest of your version.properties file? Do you use it in your
code?
You can tag your code after each success build.
Emmanuel
Adam Leggett a �crit :
Hi all,
I have added a versioning profile to a Maven 2 pom as follows
<profiles>
<profile>
<id>version-increment</id>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>increment version</id>
<phase>generate-sources</phase>
<configuration>
<tasks>
<taskdef name="jreleaseinfo"
classname="ch.oscg.jreleaseinfo.anttask.JReleaseInfoAntTask"
classpath="maven.plugin.dependency.classpath">
</taskdef>
<jreleaseinfo className="SimpleVersionInfo"
packageName="uk.co.upco.engage"
targetDir="${project.build.directory}"
buildNumFile="${basedir}/version.properties"
buildNumProperty="buildnum"></jreleaseinfo>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-scm-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<configuration>
<includes>version.properties</includes>
<message>incremented build version</message>
</configuration>
<goals>
<goal>checkin</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
This allows me to display the build version of my app when its
packaged. I'd like to tie this to my continuum builds somehow. If only
continuum runs the profile, it does the increment and checks in the
version number. I'd like to match the version number to continuums own
build number, but I cant figure how to do this.
Continuum seems to
a) not list failed builds with an id and
b) log the builds with a different id e.g. my m2 project build#5 is
logged as 135.log.txt
Does anyone have an idea of how to best approach this issue of
versioning builds with continuum?
TIA
Adam
Adam Leggett <[EMAIL PROTECTED]>
Senior Consultant
UPCO
Direct Line: 0113 20 10 631
Fax: 0113 20 10 666
<http://www.upco.co.uk>
======================================================================
=====
The contents of this email are intended for the named addresses and may
contain confidential and/or privileged material. If received in error,
please contact UPCO head office on +44(0)113 201 0600 and then delete
the entire mail from your system. Unauthorised review, distribution,
disclosure or other use of information could constitute a breach of
confidence. Your co-operation in this matter is greatly appreciated.
Every effort has been taken to ensure that this email and any
attachments are virus-free. However, UPCO does not make any warranty
to this effect, and is not liable for any damage done by an infected
email message or attachment. UPCO recommends that all emails and
attachments are checked before opening.
All views or opinions expressed in this electronic message and its
attachements are those of the sender and do not necessarily reflect
the views and opinions of The Ultimate People Company Ltd.
===========================================================================
/*/John Goyer/*/
Software Engineer
Motricity <http://www.motricity.com/>
(919)
(919) 287-7401 - fax
www.motricity.com <http://www.motricity.com/>
view corporate video <http://corp.motricity.com/press/video.php>
NOTICE: This e-mail message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information of
Motricity. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the
sender by reply e-mail and destroy all copies of the original message.