ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Reason" <matt.rea...@movielink.com>
Subject Ant-Contrib foreach | parallel not working..
Date Tue, 20 May 2003 22:12:52 GMT



Hello,

I have a target I'd like to call n times.  I've set up a foreach loop
and it works great.  The only issue is it wastes time because one
execution of the target can only happen at one time.  It'd be much more
efficient to run the target in parallel.

The foreach task has a parallel option, but it seems to be ignoring the
fact that I set it to true.  Has anyone else experienced this or,
hopefully, worked around it?

Below is a rough idea the build.  Basically, I have a file with a list
of host names of severs I want to connect to and run a script on.  Since
each server is it's own 'world', it doesn't matter if they are all done
at the same time or not.(other than efficiency).

<target name="deployToServers"/>
  <loadfile property="server_deploys"
srcFile="./properties/server_deploys"/>
  <foreach 
    list="${cms_deploys}" \
    delimiter="&#x0A;" 
    param="thisServer" 
    target="executeRemoteBuildScript" 
    inheritAll="true" 
    parallel="true"/>                
</target> 

<target name="executeRemoteBuildScript">
  <echo message="*********** ${userid}@${thisServer} ***********"/>
  <sshexec 
     host="${thisServer}" 
     username="${userid}" 
     password="${ftp_password}" 
     trust="yes" 
     timeout="800" 
     command=". .profile; cd bin; ant;"/>
</target>


PS, if I do get this to work, what does the output to the screen look
like?  I bet it get's a little crazy.

Thanks in advance for any help,

Matt

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


Mime
View raw message