<ant:buildnumber doesn't work. It doesn't do any action.
I used the following goals
<goal name="vsrm:load-build-info">
<ant:property file="buildinfo.properties"/>
<ant:echo>Previous Build Number : ${previous.build.number}</ant:echo>
<ant:echo>Previous Build Date : ${previous.build.date}</ant:echo>
<ant:echo>Current Build Number : ${build.number}</ant:echo>
<j:set var="cvs.tag.previous.build"
value="${cvs.tag.prefix}${previous.build.number}"/>
<j:set var="cvs.tag.current.build"
value="${cvs.tag.prefix}${build.number}"/>
<ant:echo>${cvs.tag.previous.build}</ant:echo>
<ant:echo>${cvs.tag.current.build}</ant:echo>
</goal>
<goal name="vsrm:update-build-info" prereqs="vsrm:load-build-info">
<ant:propertyfile file="buildinfo.properties"
comment="My properties">
<ant:entry key="previous.build.number"
value="${build.number}" default="0"/>
<ant:entry key="previous.build.date" type="date"
value="now" pattern="MM-dd-yyyy HH:mm:ss"/>
<ant:entry key="build.number" type="int"
default="${build.number}" operation="+"/>
</ant:propertyfile>
</goal>
Regards,
Thiru
-----Original Message-----
From: Lester Ward [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 8:36 PM
To: 'Maven Users List'
Subject: RE: How to increment a number using Jelly tag
> I need to generate the build number to tag the projects. I am
> not able to use <ant:buildnumber. I want to have the build
> number in a property file, retrieve it, increment it and write
> it back to the property file. Does maven have any jelly tags
> which can be used for this?
I am curious why you need to do this. Doesn't buildnumber set a property
(build.number) for you? Why not just use it?
If you really need to mess with properties file, the PropertyFile
optional
task(http://ant.apache.org/manual/OptionalTasks/propertyfile.html) may
help
you.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This e-mail and any files transmitted with it are for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message.
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or
copying of this email or any action taken in reliance on this e-mail is strictly
prohibited and may be unlawful.
Visit us at http://www.cognizant.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]