Section 7.5. Setting Execution Order

7.5. Setting Execution Order

Like parallel, sequential is a container task which can contain other Ant tasks. In this task, the nested tasks are executed in sequence. You use this task primarily to ensure the sequential execution of a subset of tasks in the parallel task.

The sequential task has no attributes and has no nested elements besides the Ant tasks you want to run. Here's an example which uses the wlrun task to start the Weblogic Web server, waits for it to start, runs a JUnit test, and then stops Weblogic:

<parallel>     <wlrun taskname="server"            classpath="${weblogic.boot.classpath}"            wlclasspath="${weblogic.classes}:${code.jars}"            name="antserver"            home="${weblogic.home}"            properties="antserver/"/>     <sequential>         <sleep seconds="60"/>         <junit printsummary="yes" haltonfailure="yes">             <formatter type="plain"/>             <batchtest fork="true" todir="${reports.tests}">                 .                 .                 .             </batchtest>         </junit>         <wlstop/>     </sequential> </parallel>

    Ant. The Definitive Guide
    Ant: The Definitive Guide, 2nd Edition
    ISBN: 0596006098
    EAN: 2147483647
    Year: 2003
    Pages: 115
    Authors: Steve Holzner

    Similar book on Amazon © 2008-2017.
    If you may any questions please contact us: