You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Camer38 <re...@gmail.com> on 2007/02/22 14:32:34 UTC
Running “if” with a “parallel” task instead of a “sequential” task.
Hi,
At this moment I run the target without the problems.
<target name="updateFiles" description="Update the list of book.xml files">
<ac:for param="dir">
<fileset dir="$documatation.out" includes="**/book.xml"/>
<ac:sequential>
<echo message="@dir"/>
<move file="@dir" tofile="@dir.bak"/>
<ant antfile="tokenReplacer.xml" target="replaceTokens">
<property name="prp.destfile" value="@dir"/>
<property name="prp.templatefile" value="@dir.bak"/>
</ant>
</ac:sequential>
</ac:for>
<delete file="./tokenReplacer.xml"/>
</target>
I would like to use a parallel task instead of a sequential task, because
1) Better performance
2) Task does not depend on each other
Do you think it is possible?
I thing about something like that but it does not work. Correct me if my
approach is wrong.
<target name="updateFiles" description="Update the list of book.xml files">
<ac:for param="dir">
<fileset dir="$documatation.out" includes="**/book.xml"/>
<parallel>
<ac:sequential>
<echo message="@dir"/>
<move file="@dir" tofile="@dir.bak"/>
<ant antfile="tokenReplacer.xml" target="replaceTokens">
<property name="prp.destfile" value="@dir"/>
<property name="prp.templatefile" value="@dir.bak"/>
</ant>
</ac:sequential>
</parallel>
</ac:for>
<delete file="./tokenReplacer.xml"/>
</target>
Thanks in advance.
MR
--
View this message in context: http://www.nabble.com/Running-%E2%80%9Cif%E2%80%9D-with-a-%E2%80%9Cparallel%E2%80%9D-task-instead-of-a-%E2%80%9Csequential%E2%80%9D-task.-tf3272745.html#a9099869
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org