ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: Examples of ant's <parallel> Task
Date Wed, 05 Nov 2008 11:40:34 GMT
Rohit P wrote:
> Hi,
> I just now had a chance to look into <parallel> ant task. I would definitely
> start working on it and make good use of it in my time-consuming build
> scripts. To know it still better wanted to have a look into few examples
> that use this task.
> I guess most of them have come over this ant task and also used it.
> It would be great if anybody can share me some examples on this task or
> provide me a link [other than ant manual] where i can see some examples that
> use this task.
> Thanks A Ton
> Rohit

Here's one from our test code; most of the things it starts are custom 
tasks aa

   <target name="testIncompatibleProcessAllow" depends="setup">
key="org.smartfrog.sfcore.processcompound.sfProcessAllow" value="12"/>
         <application name="failToSpawn">
           #include "/org/smartfrog/components.sf"
           sfConfig extends Compound {
           sfProcessName "newProcessName";
        <waitfor maxwait="10" maxwaitunit="second"
           checkevery="1" checkeveryunit="second"
         <socket server="localhost" port="${smartfrog.daemon.port}"/>
         <sleep milliseconds="${short.delay}"/>
         <sf-stopdaemon failonerror="false"/>

It starts an application in one parallel (custom task running <java>), 
then spins for a bit until a port goes live, waits a short moment and 
then shuts down the application.

Be careful about using lots of ant tasks (especially third party tasks) 
in a <parallel> as they may not be thread safe. ant core is mostly 
locked down, but you are on your own with other people's code

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message