Compiling Files With Ant

To compile your sources with Ant instead of the IDE's built-in compilation support, simply execute all or any part of your Ant script. You can apply a special compiler type, Indirect Ant Compilation, to arbitrary files so that the files are built with Ant whenever you choose the Compile command or press F9.

To set a file to use Indirect Ant Compilation:

  1. Right-click the Java source node in the Explorer and choose Properties.
  2. In the Execution tab, click the ellipsis (...) button in the Compiler property.
  3. In the Compiler property editor, select Indirect Ant Compilation.
  4. If necessary, set specific targets to run when performing an incremental compilation, building from scratch, and cleaning. These targets are run by all files that use Indirect Ant Compilation.
  5. By default the Ant script to run is located using Ant's normal -find search algorithm, going up directories from the source file until a build.xml file is found. If you want to select a specific script to use for an indirect compiler, type it in the Script property. You can type in a full file path to a build script, or click the ellipsis button to browse to a build script located in the IDE's mounted filesystems. This script is run by all files that use Indirect Ant Compilation.
  6. Click OK to exit the Compiler property editor.

    Changes to the script and targets run by Indirect Ant Compilation are applied to all files that use Indirect Ant Compilation.

See also
Compiling Projects With Ant
Running an Ant Script
Executing a Target
Creating a Shortcut to a Target
Editing an Ant Script
Configuring Ant Settings

Legal Notices