## Do

### Description

This task is similar to the `<antcall>` task; however, `<do>` will not re-run common dependencies. Using `<antcall>` to run several targets that all have the same dependency(s) will cause the dependent target(s) for each called target to be run again. This results in common targets, such as "init"-type targets, being run many times. Using `<do>` instead of `<antcall>` prevents any common dependencies from being run more than once.

Note: The `<do>` task will still re-run any dependent target that was run prior to the `<do>` task(s) being run.

### Parameters

Attribute | Description | Required
target | The target to run. | Yes

### Examples

      <target name="all">
        <do target="target1"/>
        <do target="target2"/>
      </target>

will run the targets `target1` and `target2`. If both `target1` and `target2` depend on, for example, the `init` target, it will only be run once rather than once for `target1` and again for `target2`.

Copyright © 2002 Apache Software Foundation. All rights Reserved.