Creating and Running an Ant Project
The IDE provides you with templates that let you create Ant projects, custom
Ant tasks, and shortcuts to run commonly used targets in an existing Ant project.
To create an Ant project:
- Choose File
New.
- Expand Ant Build Scripts and select one of the types:
- 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.
- Shortcut to Target. A shortcut to a target in an existing
Ant build script which runs the target. Customize the code that runs the
target if necessary. Then choose where to install the shortcut: as a menu
item, toolbar button, keyboard shortcut, or project link. Click Finish
to create the shortcut.
To run an Ant project:
- Double-click the Ant project node in the Explorer to execute the build's
default target. The Execution View window in the Running workspace displays
the application you are currently building. The build output is displayed
in the Output window.
- If you want to execute a different target than the default target, expand
the Ant project node and double-click the appropriate target node. Alternatively,
you can right-click the Ant project node and choose from the Run Target submenu.
To stop a running build:
- In the Execution View window of the Running workspace, right-click the running
build and choose Terminate Process.
Legal Notices