Setting Ant as the Default Compiler Type for a Project

See Also 

  1. Choose Tools and choose Options from the main window.
  2. Expand the Editing node and select Java Sources.
  3. Set the Default Compiler property to Indirect Ant Compilation.

Behavior of Build and Compile Commands

When you set a project to use Indirect Ant Compilation, there is no difference between the Compile and Compile All commands. Choosing either of these commands on any Java file will run the Ant script and compile the entire project. There is also no difference between the Build and Build All commands.

The Build Project, Compile Project, and Clean Project commands do not work unless you set a specific Ant script to run for the project.

Setting a Specific Ant Script for a Project

When you choose the Compile, Build, or Clean commands, the IDE looks for the Ant script to run using Ant's normal -find search algorithm. This algorithm goes up directories from the source file until a build.xml file is found. If you want a specific script to be run for all files in your project, you must specify the script in the Indirect Ant Compilation compiler type.

To specify the Ant script for a project:

  1. Choose Tools then choose Options from the main window.
  2. Expand Buidling then expand Compiler Types and select Indirect Ant Compilation.
  3. Enter the script's location in the Script property. You can type in the full path to the build script, or browse to a build script located in the IDE's mounted filesystems.

Setting the Targets for the Compile, Build, and Clean Commands

By default, the IDE runs the following targets when you choose these commands:

To set specific targets for the Compile, Build, and Clean commands:

  1. Choose Tools then choose Options from the main window.
  2. Expand Buidling then expand Compiler Types and select Indirect Ant Compilation.
  3. Type the target in the appropriate command property.
See Also
Running an Ant Script
Executing a Target
Creating a Shortcut to a Target
Editing an Ant Script
Configuring Ant Settings

Legal Notices