Split into several properties files and use
    <property file="${env}"/>

I also suggest providing a default.properties and use
    <property file="${env}"/>
    <property file="default.properties"/>

Or you'll do some tests so that needed parameters are really set. Think that 
${env} 
could have an "illegal" value.
    <fail message="Needed value not set." unless="needed.value"/>
    <fail message="Key has wrong value">
        <condition> ....



Jan


-----Ursprüngliche Nachricht-----
Von: Prashant Reddy [mailto:[EMAIL PROTECTED] 
Gesendet: Montag, 20. August 2007 11:50
An: Ant Users List
Betreff: Re: Two-level property names

May be a strategy like this will be of use :
http://blogs.sun.com/geertjan/entry/p_img_src_http_blogs

-Prashant
On Mon, 2007-08-20 at 11:36 +0200, Krzysztof Kucybała wrote:
> Hi,
> 
> I just wanted to know if there is a possibility to achieve something
> like this in Ant:
> 
> -> I have a set of names that identify different deployment 
> environments. say these are unit, dev, intern for now.
> 
> -> I have a set of properties for each of these, all in one property 
> file (wouldn't be a problem to split into multiple for a good reason),
> for example dev.url, dev.deploypath, dev.dbserver, etc.
> 
> -> what I'd like is to have a property called ${env} for the different 
> names, and use the others in the following fashion: ${${env}.url}, 
> ${${env}.deploypath} etc. Is it possible? Do I need anything more than 
> just ant to achieve this (like ant-contrib perhaps)?
> 
> Thanks for any help,
> Best regards,
> Krzysztof
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to