Hi all, I don't have write access to the cvs tree. Could one of the committers please consider the attached task for inclusion. Thanks.
The intent of this task is to synchronize execution of multiple
processes and/or servers. It blocks until a series of conditions become
true (they typically become true by an external process starting
successfully or completing some task). This is particularly useful where
the other process is started by ant itself, using the <parallel> task. A
common pattern is:
<target name="test" depends="deploy, create-test-env">
<parallel>
<wlrun beahome="${weblogic.dir}"
home="${weblogic.dir}/wlserver6.1"
domain="mydomain"
classpath="${weblogic.classes}"
password="weblogic"/>
<sequential>
<waitfor maxwait="5m" checkevery="200ms">
<http url="http://localhost:7001/index.html"/>
</waitfor>
<junit fork="yes" printsummary="yes" haltonfailure="no">
<!-- junit config -->
</junit>
<wlstop beahome="${weblogic.dir}"
classpath="${weblogic.classes}"
user="system"
url="t3://localhost:7001"
password="weblogic"/>
</sequential>
</parallel>
</target>
Besides waiting for web requests to succeed, you can also wait for other
conditions to exist such as a file being created or a server starting to
listen on a port.
Attached are the source and documentation files for the new task, and
the patches to defaults.properties and coretasklist.html.
Regards,
Denis
Index: docs/manual/coretasklist.html =================================================================== RCS file: /home/cvspublic/jakarta-ant/docs/manual/coretasklist.html,v retrieving revision 1.26 diff -u -r1.26 coretasklist.html --- docs/manual/coretasklist.html 2001/11/21 07:31:01 1.26 +++ docs/manual/coretasklist.html 2001/11/24 23:37:55 @@ -81,6 +81,7 @@ <a href="CoreTasks/unzip.html">Unwar</a><br> <a href="CoreTasks/unzip.html">Unzip</a><br> <a href="CoreTasks/uptodate.html">Uptodate</a><br> +<a href="CoreTasks/waitfor.html">Waitfor</a><br> <a href="CoreTasks/war.html">War</a><br> <a href="CoreTasks/zip.html">Zip</a><br> </body> Index: src/main/org/apache/tools/ant/taskdefs/defaults.properties =================================================================== RCS file: /home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/defaults.properties,v retrieving revision 1.97 diff -u -r1.97 defaults.properties --- src/main/org/apache/tools/ant/taskdefs/defaults.properties 2001/11/16 12:30:58 1.97 +++ src/main/org/apache/tools/ant/taskdefs/defaults.properties 2001/11/24 23:38:05 @@ -56,6 +56,7 @@ bzip2=org.apache.tools.ant.taskdefs.BZip2 bunzip2=org.apache.tools.ant.taskdefs.BUnzip2 checksum=org.apache.tools.ant.taskdefs.Checksum +waitfor=org.apache.tools.ant.taskdefs.WaitFor # optional tasks script=org.apache.tools.ant.taskdefs.optional.Script
WaitFor.java
Description: Binary data
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
