Getting started
In this tutorial, you'll learn about Ant, a build tool for Java TM projects. Ant has quickly become popular among Java developers because of its flexibility and ease of use, so you it owe it to yourself to find out more about it.
You don't need any prior experience with or knowledge of Ant before you proceed. We'll first see the basic structure of Ant build files, and learn how to invoke the tool. We'll walk through the steps involved in writing a build file for a simple Java project, and then look at some of Ant's other useful functions, including filesystem operations and pattern matching. We'll finish by writing our own Java class that extends Ant's functionality.
In the course of the tutorial, we'll show you how to run Ant both from the command line and from within the open source Eclipse IDE. You don't need both environments to try out the examples; you can choose either, or even a different development environment, as long as it supports Ant. If you choose to use Ant from the command line, you will need to follow the installation instructions on the Ant home page (see Resources for a link) if Ant is not installed on your machine already. If instead you decide to use only the Eclipse environment, you don't need to install Ant separately, as it is included with Eclipse. If you don't have it already, you can download Eclipse from Eclipse.org (see Resources ).
If you write Java code and you're not already using Ant, then this tutorial is for you. Whether you're currently using a different build tool, or none at all, learning more about Ant will probably encourage you to make the effort to switch to it.
If you are already using Ant, then you might still find something of interest here. Perhaps you find some of Ant's behavior unexpected or difficult to fully understand; this tutorial will help. Or maybe you're familiar with the basics but want to know about advanced topics such as chaining builds together, working with CVS repositories, or writing custom tasks; we'll cover all of these topics here.
Ant is designed primarily for building Java projects, but that's not its only use. Many find it helpful for other tasks, such as performing filesystem operations in a cross-platform way. Also, there are a number of third-party Ant tasks available, and writing a custom Ant task is relatively simple, so it's easy to tailor Ant to a particular application.

