ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zarar Siddiqi" <zarar.sidd...@utoronto.ca>
Subject Re: How to execute a subtask conditionally if used several times
Date Thu, 16 Jun 2005 15:39:37 GMT
Ant-contrib's <foreach> tag can do it.....
<foreach target="my-target"....>

http://ant-contrib.sourceforge.net/tasks/tasks/foreach.html

Zarar


----- Original Message ----- 
From: <Jan.Materne@rzf.fin-nrw.de>
To: <user@ant.apache.org>
Sent: Thursday, June 16, 2005 1:07 AM
Subject: AW: How to execute a subtask conditionally if used several times


> Maybe <macrodef> would better than a called <target> ...
>
> Jan
>
>>-----Urspr√ľngliche Nachricht-----
>>Von: Alexey N. Solofnenko [mailto:A.Solofnenko@mdl.com]
>>Gesendet: Mittwoch, 15. Juni 2005 19:34
>>An: Ant Users List
>>Betreff: Re: How to execute a subtask conditionally if used
>>several times
>>
>>You can put <antcall> inside <apply>.
>>
>>- Alexey.
>>
>>Dr. Michael Lipp wrote:
>>> Hi,
>>>
>>> I have a target that produces an output file based on an
>>input file. I
>>> invoke this target several times using antcall with
>>different pairs of
>>> input and output files (using <antcall><param ...>).
>>>
>>> As an optimization, I want to do the generation only if the
>>input file
>>> is newer than the output file. In order to do this, I have to set a
>>> property with <uptodate>. Of course, I would like to do this in my
>>> antcall-ed target to avoid duplication of code.
>>>
>>> But how can I reset the property once it has been set in my
>>> "sub-target"? Once a property is set, it cannot be changed. So if the
>>> first antcall causes e.g. "isUpToDate" to be set, all subsequent
>>> antcalls will be executed as well.
>>>
>>> Any solution?
>>>
>>> Regards,
>>>
>>>     Michael
>>>
>>-- 
>>---------------------------------------------------------------
>>---------
>>/ Alexey N. Solofnenko
>>home: http://trelony.cjb.net/
>>/
>>
>>---------------------------------------------------------------------
>>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
>
> 



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


Mime
View raw message