ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mathieu Champlon <m.champ...@free.fr>
Subject Re: How to set dynamic variables in Ant?
Date Tue, 12 Sep 2006 07:20:22 GMT
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


Mime
View raw message