Skip to content
nathanscottdaniels edited this page Oct 16, 2016 · 3 revisions

<sequence/> Task

The sequence task is identical to the parallel task with the exception that it executes all targets sequentially instead of in parallel. By itself, this task serves no purpose and its primary use is as a nested element within a <parallel> task.

The task has the following attributes (there are no required attributes):

Optional Attributes:

  • name: Allows you to give a name to the task. This serves both to increase build script readability and is also used by pNAnt when logging to the console.
  • description: Allows you to describe this task to improve buildscript readability. Unlike name, the value of this attribute is ignored by pNAnt.
  • if: Same as the if attrubute of other NAnt tasks.
  • unless: Same as the unless attrubute of other NAnt tasks.
  • __'failonerror__: Same as the failonerror` of other NAnt tasks.

Nested Elements

The sequence task supports three nested element types which are used to specify the actions that should be performed in sequence. See the parallel task page for more details on these elements.

  • <pcall/>
  • <sequence/>
  • <parallel/>

Examples

A simple example that calls three targets in sequence. This is identical to using three <call/> tasks.

<sequence name="Simple Example">
    <pcall target="target_alpha"/>
    <pcall target="${target_name}" if="${some_condition}" />
    <pcall target="target_charlie" unless="${some_condition"/>
</sequence>

See the parallel task page for more examples.

Clone this wiki locally