Creating an Ant Project
The IDE provides you with templates that let you create Ant projects and custom
Ant tasks. You can also create shortcuts to run commonly used targets in an
existing Ant project, such as build or clean. You can save these shortcuts as
toolbar buttons, menu items,
To create an Ant project or custom task:
- Choose File
New.
- Expand the Ant Build Scripts node and select one of the following:
- Blank Ant Project. An empty Ant project for you to create
from scratch. Supply the name and directory for the project and click
Finish. The empty XML file opens in the Source Editor.
- Sample Ant Project. A sample Ant project consisting of a
generic build script with basic make operations that you can use. Supply
the name and directory for the project and click Finish. The sample XML
file opens in the Source Editor.
- Custom Task. A subclass of org.apache.tools.ant.Task
in which you define custom build tasks. You can call these tasks in your
Ant script using taskdef. Enter the package and name for the
class and click Finish to open the file in the Source Editor.
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