ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: Dereferencing property files
Date Thu, 03 Dec 2009 12:48:52 GMT
Do you mean this: ?


>-----Urspr√ľngliche Nachricht-----
>Von: Dalton, Tom [] 
>Gesendet: Donnerstag, 3. Dezember 2009 10:39
>An: Ant Users List
>Betreff: RE: Dereferencing property files
>Should I assume that this is impossible in Ant? This seems 
>like a major limitation...
>-----Original Message-----
>From: Dalton, Tom 
>Sent: 01 December 2009 12:05
>Subject: Dereferencing property files
>I have a property file with an entries like:
>In my build file I want to be able to refer to this property 
>with a version-independent name like "atk.base.dir"
>I load the property file, to get the properties 
>I set another property "atk.version" to a value of "1.26.0"
>How do I combine these to get the new property "atk.base.dir".
>E.g. I want to double dereference a property:
><loadproperties srcFile="/path/to/my/atk/"/>
><echo>atk-1.26.0.exported.base.dir</echo><!-- works ok -->
><echo>atk-1.27.0.exported.base.dir</echo><!-- works ok --> 
><property name="atk.version" value="1.26.0"/> <property 
>value="${atk-${atk.version}.exported.base.dir}"<!-- doesn't work-->
>I tried to do it with
><property name="atk.base.dir" 
>refid="atk-${atk.version}.exported.base.dir"<!-- also doesn't 
>work--> But that doesn't work because the loaded property does 
>not have an id, only a name, so the refid lookup fails.
>I just want to set my external dependency versions in one place!
>It cannot be that hard!
>All help gratefully received!
>To unsubscribe, e-mail: For 
>additional commands, e-mail:
>To unsubscribe, e-mail:
>For additional commands, e-mail:

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

View raw message