ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: AW: token filtering
Date Wed, 12 Nov 2008 05:44:53 GMT
I added a new example in the manual

  <property environment="env"/>
  <property file="${}.properties"/>
  <property file="${env.STAGE}.properties"/>
  <property file=""/>

This buildfile uses the properties defined in Regarding to the environment
variable STAGE some or all values could be overwritten, e.g. having STAGE=test and a
you have special values for that (like another name for the test server). Finally all these
values could be overwritten by personal settings with a file per user. 

Do you think that clarifies that?


>-----Urspr├╝ngliche Nachricht-----
>Von: Rez [] 
>Gesendet: Dienstag, 11. November 2008 21:57
>An: Ant
>Betreff: RE: AW: token filtering
>Great, thanks for your help> Subject: AW: token filtering> 
>Date: Tue, 11 Nov 2008 06:54:36 +0100> From: 
>> To:> > >I use 
>couple of property files packaged into my war file > >destined 
>for different environment such as Development, QA, > >Staging, 
>Production. I currently keep different versions of > >each 
>file for each environment having values specific to each > 
>>env and the 4 different build targets for each env refer to > 
>>their own matching property files. They're kinda getting out 
>> >of hand, having muliple copies of each file! I would like 
>to > >keep one version of the files with the changing 
>environment > >values replaced with tokens and during the 
>compile based on a > >flag or value being set, such as if flag 
>equal to QA, > >@ip.address@ should be replaced with 
> How > >is this possile without resorting 
>to ant.contrib?> > <property name="flag" value="qa"/>> 
><property file="${flag}.properties"/>> <property 
>file=""/>> > > contains 
>ALL values.> contains the values which DIFFER 
>from the default one.> similar.> flag would 
>be "qa" or "stageB" and load the specified file.> If flag is 
>something else where you havent any properties file, the> 
>non-existing> file is just ignored.> > > Jan> > 
>------> To unsubscribe, e-mail: 
>> For additional commands, 
>See how Windows® connects the people, information, and fun 
>that are part of your life

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message