You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "CAMPANA,SAL (HP-Philadelphia,ex1)" <sa...@hp.com> on 2001/08/22 18:12:27 UTC

how do I to tell ANT not to wait for a task to finish?

Is there a way to make a task run and continue through the ant script
without waiting for the task to end?

For instance, I want to start an external application, then start another to
interact with that application.  

It seems that ANT only runs sequentially and waits for a task to finish
before moving to the next task.  This makes total sense for building my
classes, but I'd love to be able to spawn separate threads of execution
without waiting.

One way I did it was to call a batch file which started my app.  The batch
file will die after it executes the command and the ANT file moves on....

Any ideas? Am I missing something?

Thank you!

Re: how do I to tell ANT not to wait for a task to finish?

Posted by Matthew Inger <ma...@sedonacorp.com>.
CAMPANA,SAL (HP-Philadelphia,ex1) wrote:

>Is there a way to make a task run and continue through the ant script
>without waiting for the task to end?
>
>For instance, I want to start an external application, then start another to
>interact with that application.  
>
>It seems that ANT only runs sequentially and waits for a task to finish
>before moving to the next task.  This makes total sense for building my
>classes, but I'd love to be able to spawn separate threads of execution
>without waiting.
>
>One way I did it was to call a batch file which started my app.  The batch
>file will die after it executes the command and the ANT file moves on....
>
>Any ideas? Am I missing something?
>
>Thank you!
>
look at ant 1.4 beta..., specifically the "parallel" task.  It allows 
you to run several tasks at the same
time.  Say for instance, a server process, and a client process that 
talks to the server process.


-- 
Matt Inger (matt.inger@sedonacorp.com)
Sedona Corporation
455 S. Gulph Road, Suite 300
King of Prussia, PA 19406
(484) 679-2213
"Self-respect - the secure feeling that no one,
 as yet, is suspicious." -H.L. Mencken 




Re: how do I to tell ANT not to wait for a task to finish?

Posted by T Master <tm...@iknowledgeinc.com>.
if u are allowed to fork="true" a task, do so.  its task implementation
dependent though.


----- Original Message -----
From: "CAMPANA,SAL (HP-Philadelphia,ex1)" <sa...@hp.com>
To: "ANT List (E-mail)" <an...@jakarta.apache.org>
Sent: Wednesday, August 22, 2001 10:12 AM
Subject: how do I to tell ANT not to wait for a task to finish?


> Is there a way to make a task run and continue through the ant script
> without waiting for the task to end?
>
> For instance, I want to start an external application, then start another
to
> interact with that application.
>
> It seems that ANT only runs sequentially and waits for a task to finish
> before moving to the next task.  This makes total sense for building my
> classes, but I'd love to be able to spawn separate threads of execution
> without waiting.
>
> One way I did it was to call a batch file which started my app.  The batch
> file will die after it executes the command and the ANT file moves on....
>
> Any ideas? Am I missing something?
>
> Thank you!
>