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:

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:

  1. Choose File and choose New from the main window.
  2. In the New wizard, expand the Ant Build Scripts node, select Shortcut to Target, and click Next
  3. 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.
  4. 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.
  5. 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.
  6. 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 and choosing Keyboard Shortcuts. The wizard only shows those steps that you selected in panel 2.
  7. When you have specified all of the necessary information, click Finish. The shortcut is created in the specified locations.
See also
Creating and Running an Ant Project
Compiling Files With Ant
Creating Custom Ant Tasks

Legal Notices