ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: How to set dynamic variables in Ant?
Date Tue, 12 Sep 2006 07:40:26 GMT
http://ant.apache.org/faq.html#propertyvalue-as-name-for-property

Jan
 

>-----Ursprüngliche Nachricht-----
>Von: Mathieu Champlon [mailto:m.champlon@free.fr] 
>Gesendet: Dienstag, 12. September 2006 09:20
>An: Ant Users List
>Betreff: Re: How to set dynamic variables in Ant?
>
>Jack.Tang a écrit :
>> Hi,
>>
>> Here is the problem I am now facing:
>>
>>   <property file="todo.list" />
>>   <tstamp>
>>     <format property="TODAY" pattern="yyyyMMdd" locale="en"/>
>>   </tstamp>
>>   
>>   <property name="todayTodo" value="${${TODAY}.todo}">  <!--Broken 
>> HERE!!-->
>>
>> Some todo items in todo.list are
>> 20060912.todo = foo
>> 20060912.todo = bar
>>
>> Appreciate your suggestion to solve this problem.
>> Thanks
>>   
>Hello !
>
>Take a look at the ant-contrib <propertycopy> task : 
>http://ant-contrib.sourceforge.net/tasks/tasks/propertycopy.html
>
>However you will probably not achieve what you are looking for 
>by having several occurences of the same property in your 
>todo.list file : see 
>http://ant.apache.org/manual/CoreTasks/property.html for a 
>description of how properties (and property files) work.
>You should try and make them lists somehow, like :
>
>20060912.todo = foo,bar
>
>Or maybe even use a complete different file format (xml ?).
>
>I hope this helps.
>
>MAT.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
>additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message