ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aarti Chandnani <>
Subject RE: same old question(slightly long)
Date Wed, 02 May 2001 00:24:09 GMT
well so i wasnt clear :-)
thats the way i have it 

and in ANT 
<replace file="" token="which" value="${ver}"/>

and i use the commandline to pass the value of ver as wither nightly or 2.1

But the prb is:
If i replace my manifest with a token either which or @@version@@ or
whatever else,
at the time of release I wont remember the correct version number to
Its not just one jar file, there are many jar files and I dont want to
remember all version numbers for all jar files.

-----Original Message-----
From: Peter Donald []
Sent: Tuesday, May 01, 2001 5:18 PM
Cc: ''
Subject: Re: same old question(slightly long)

>I have a manifest file 
>which has in it the line say, 
>I use this manifest file when I build my jar files. 
>Now if its a nightly build , I need the file to say: 
>But if its a release, I need it to say Package-Version:2.2 (next release
2.1 + 1)  
>I could accomplish this by Propertyfile but it replaces the ":" with "=" 
>2nd option: replace. But this would mean i search for  2.1 nd replace with
"nightly" (hardcoded)  
>and then if there was to be a release ,  i now search for and replace  2.2
with "nightly" 
>also i have lots of projects being built with diff versions.  So many ant
files  will have to be maintained. 
>SO i thought of having something like have Package-Version:which in all
manifest files  and then ant replaces which to Nightly
>But this doesnt work since I lose my version information if i write
Package-Version:which in all manifest files. 
>I dont want to do a echo cause i will have a lot of code hardcoded in ANT
>Any way out ??? 

how about
Package-Version: @@VERSION@@

<copy file="" tofile="" />
<replace file="" token="@@VERSION@@" value="${version}"/>

Then somewhere you set the version property depending on what you want. ie

<property name="version" value="NIGHTLY" />
<property name="version" value="2.1" />

>p.s. was I clear? 

If I answered your question then yes - otherwise no ;)


| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |

View raw message