Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
while-like structure in Ant

while-like structure in Ant

2007-05-10       - By Xavier Hanin
Reply:     1     2     3     4     5     6     7     8     9  

On 5/10/07, Emir Mahmut BAHSI <embahsi@(protected)> wrote:
>
> Hi all,
> I have been working on conditional structures and loop structures on
> existing workflow managers for a long time. For this purpose I have
> implemented two simple examples for if-type and switch-type cases (examples
> are attached). In these examples my program is simply downloading a file. If
> that file does not exist in the first web address it tries another address.
> However, I could not implement a loop structure for that. In the loop case
> the program should try the same address until the file exists. Actually I
> know this is not a reasonable and useful scenario but I just want to show
> whether a conditional-loop scenario can be implemented in Ant.
>
> Can u suggest me anything to implement that example. Any help is
> appreciated.


The ant-contrib project is providing conditional tasks which may help, but
if you want to have your own syntax and the very specific url availability
as a condition (like you wrote), maybe using a script (using scriptdef for
example) would be a good fit.

Xavier

Thanks.
>
>
>
> *Emir Mahmut Bahsi
> Research assistant
> Dept of Computer Science at LSU
> Room 231,
>  Johnston Hall
> Louisiana State University
> Baton Rouge, LA 70803
> embahsi@(protected)*
>
> *
> *
>
> ------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check out new cars at Yahoo! Autos.<http://us.rd.yahoo.com/evt=48245/*http:/
/autos.yahoo.com/new_cars.html;_ylc
=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM->
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


--
Xavier Hanin - Independent Java Consultant
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.