Executing a Target
An Ant project can contain one or more targets, which can be executed
individually or in a dependency-driven sequence.
You can run a specific target in any of the following ways:
- In the Explorer, expand the Ant project node and double-click the target
node.
- Right-click the Ant project node and choose the target from the Run Target
submenu.
- Right-click the Ant project node and choose Properties. In the Execution
tab, click the ellipsis (...) button in the Executor property to open the
Executor property editor. In the Run Target(s) property, enter the targets
to be run and click OK. This action makes these targets the default targets
run by all Ant scripts that use Ant Script Execution.
Creating a Shortcut to a Target
In addition to the above procedures for running a target, you can create a
mini-script, which serves as a shortcut to a commonly used target. You can also
customize the way the target is run. The shortcut can be saved as as a menu
item, toolbar button, keyboard shortcut, or project link.
To create a shortcut to a target:
- Choose File
New from
the main window.
- In the New wizard, expand the Ant Build Scripts node, select Shortcut to
Target, and click Next
- In the Choose Options panel of the wizard, choose where you want to place
the target and whether you want to customize its Ant code. Click Next to proceed.
- Choose the target in the Select Ant Target panel. The target you want to
create a shortcut for must already exist in a mounted filesystem. A shortcut
can only point to one target. Click Next to proceed.
- In the Customize Script panel, add or change any of the Ant script's elements,
such as tasks or properties. This panel only appears if you selected the Customize
generated Ant code checkbox in panel 2.
- In the remaining panels of the wizard, choose which projects, toolbar, menu,
or keyboard shortcut to assign the shortcut to. Make sure you do not overwrite
any existing keyboard shortcuts. You can view existing keyboard shortcuts
by choosing Tools
Keyboard
Shortcuts. The wizard only shows those steps that you selected in panel 2.
- When you have specified all of the necessary information, click Finish.
The shortcut is created in the specified locations.
Legal Notices