Beginning Ant Tutorial

Intro
Ant is a Java based build tool developed as part of the Apache Jakarta project. You can get it from the Ant home site: jakarta.apache.org/ant. At first the usefulness of Ant may not be readily apparent, but after using it for awhile on even small projects you may be surprised at how much you come to rely on it. For example, the ability to build files into specific directories, generate JavaDoc and package classes into JAR files for deployment all in one keystroke is extremely powerful. Here is a non-exhaustive list of what Ant can do:
  • Extract source from a version control system
  • Create directories
  • Delete directories
  • Compile code
  • Generate javadoc
  • Jar files
  • Copy files
  • Generate e-mail
  • FTP files
  • Execute SQL statements
  • Run unit tests
Installation
This tutorial will deal with installation on Windows 2000. Since Ant is Java, it will also run on Linux (or anything else for that matter), although I have not personally tried it yet since our main development platform is currently Win2k.
After downloading and unzipping the download contents, copy the Ant directory to the root of your C:\ drive, so the path is C:\Ant. You can install it anywhere you want, but this is most convenient. Now it's time to set up some environment variables so that the system can find Ant when we need it. To do this go to the Control Panel, select "System", click on the "Advanced" tab along the top. In the property sheet that opens you will see an "Environment Variables" button in the middle. Click that.

Next >>