You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Steve Cohen <St...@ignitesports.com> on 2001/12/17 17:17:41 UTC
Looping in ant
I recognize that ant may not be the right place to do this, but I now
find myself in a situation where some sort of looping construct would be
very convenient
something like
<loop until="${condition}" >
... do tasks
<sleep...>
</loop>
My use case for this is to run some test repeatedly at timed intervals.
I realize that the "until" part of this might raise some immutability
hackles, but I would even be able to live without that, just an
unconditional loop.
Is there a way to do this? I don't see one. I suspect someone might
have raised this before it was rejected. If so, can someone give me a
brief update as to why it has been rejected?
Re: Looping in ant
Posted by Ken Wood <kw...@i2.com>.
Why not set up a shell script that invokes ant with the target(s)
for your test(s)? The shell script would have the loop and
sleep...
Steve Cohen wrote:
> I recognize that ant may not be the right place to do this, but I now
> find myself in a situation where some sort of looping construct would be
> very convenient
>
> something like
> <loop until="${condition}" >
> ... do tasks
> <sleep...>
> </loop>
>
> My use case for this is to run some test repeatedly at timed intervals.
>
> I realize that the "until" part of this might raise some immutability
> hackles, but I would even be able to live without that, just an
> unconditional loop.
>
> Is there a way to do this? I don't see one. I suspect someone might
> have raised this before it was rejected. If so, can someone give me a
> brief update as to why it has been rejected?
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>