ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Hennessy" <de...@network365.com>
Subject [SUBMIT] Waitfor task
Date Sun, 25 Nov 2001 00:00:39 GMT
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

Mime
View raw message