ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Weintraub" <qazw...@gmail.com>
Subject Re: Ant loop
Date Thu, 22 May 2008 05:12:54 GMT
Sounds like what you REALLY want to do is the <parallel> task. This
allows you to specify multiple tasks that can take place at the same
time. The <parallel> task will wait for each to complete before
continuing.

There's no need for a flag or a loop.

<target name="db_deploy">
    <yadda>
    <yadda>
    <yadda>
</target>

<target name="code_deploy">
    <yadda>
    <yadda>
    <yadda>
</target>

<target name="deploy_and_restart_servers">
    <parallel>
       <ant target="db_deploy"/>
       <ant target="code_deploy"/>
    </parallel>
    <yadda task="Start Servers/>
</target>


On Wed, May 21, 2008 at 6:27 PM, I am Who i am <ragjan@gmail.com> wrote:
> Hi All,
>
> Is there a way to loop the ant executing on time basis,
>
> eg. Lets say i'm doing db and code deployment in parallel, but i want to
> wait for both to be completed before restarting servers for code deployment.
> so i thought i would create a flag at the end of db deployment, then at the
> end of code deployment process will check for the existence of db-completed
> flag, if its available it will set the property "dbcompleted" then in my ant
> target i defined it has with if="dbcompleted"
>
> Now this works, ant target won't get executed, if doesn't see property, then
> it comes out, but i want to loop it something like, wait for 2mts then try
> again,which will go back and see if property available to execute the ant
> target
>
> any idea?
>

--
David Weintraub
qazwart@gmail.com

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


Mime
View raw message