Ant - Eclipse Integration

Advertisements


If you have downloaded and installed Eclipse already, you have very little to do to get started. Eclipse comes pre bundled with the Ant plugin, ready for you to use.

Follow the simple steps, to integrate Ant into Eclipse.

  • Make sure that the build.xml is part of your java project, and does not live in an location that is external to the project.

  • Enable Ant View by going to Window > Show View > Other > Ant > Ant

  • Open Project Explorer, drag the build.xml into the Ant View

Your Ant view show now look similar to:

Eclipse Ant Integration

Clicking on the targets, build / clean / usage will run Ant with the target for you.

Clicking "fax" will execute the default target - usage

The Ant Eclipse plugin also comes with a good editor for editing build.xml files. The editor is aware of the build.xml schema and can assist you with code completion.

To use the Ant editor, right click your build.xml (from the Project Explorer) and select Open with > Ant Editor. The Ant Editor should loook something similar to:

Eclipse Ant Integration

The Ant editor lists the targets in the right hand side, The target list serves as a bookmark that allows you to jump straight into editing a particular target.



Advertisements
Advertisements