ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evgeny <evgeny.zis...@gmail.com>
Subject Re: variables or a counter ?
Date Tue, 19 Aug 2008 14:10:08 GMT
IMHO ant is not a suitable tool for the task you need, ant is a build tool -
not a scripting language.
In your case it would be much better to use some other language, like
ruby/python/bash/perl/whatever ... than to use ant.

On Tue, Aug 19, 2008 at 4:48 PM, Scot P. Floess <floess@mindspring.com>wrote:

> Just a note, be careful about recursively calling a macro...  You will
> eventually get a stack overflow.  I did something like this with a simulated
> for-loop using Ant Contrib's Math task.  I found after around 300 - 400
> iterations I'd get a stack overflow...
>
>
> On Tue, 19 Aug 2008, Ivar Bratberg wrote:
>
>  Hi,
>> I have the following problem I try to solve in ant.
>> I should check a www server for a certain result each minute.
>> I should keep on checking until a desired result is given ( the file
>> downloaded should exceed a certain limit )
>> In addition it should have a kind of timeout so it it will return if it
>> has tried too many times.
>>
>>
>> I I have made a ant macro which calls itself recursively since there is
>> no <while> task
>> I have also access to a <if> task so I manage to check if I have got the
>> wanted result
>>
>>
>> But as mentioned I would like to have a timeout, by counting up a
>> parameter which is given to the recursive macro.
>> Is this possible ?
>> I have not seen any <add> or <math> task.
>>
>> Do some of you have better suggestions for solving this ?
>> Note, I cannot use <waitfor> task, because I have to check not only for
>> error code on the response, but the text itself( I manage whith checking
>> the length of the file downloaded >
>>
>> To summarize my questions:
>>
>> - Can I add to variables/properties and but the result in a third
>> property ?
>> - Is there a better way than recursive macro to achieve the effect of
>> <while> looping ?
>>
>> Ivar
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>>
> Scot P. Floess
> 27 Lake Royale
> Louisburg, NC  27549
>
> 252-478-8087 (Home)
> 919-754-4592 (Work)
>
> Chief Architect JPlate   http://sourceforge.net/projects/jplate
> Chief Architect JavaPIM  http://sourceforge.net/projects/javapim
>
> Architect Keros          http://sourceforge.net/projects/keros
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message