Installing Ant

Before you install Tomcat from source, or indeed before you start any serious Java-based project, you should install Ant. Ant is a Java-based build tool that has become ubiquitous. You use it to build and deploy applications. It benefits from platform independence and can use a single build file on multiple platforms. However, the build files must minimize dependency on a specific file path. (Windows paths, for example, will cause problems on Linux, and vice versa.)

You can download the latest binary distribution of Ant from http://ant.apache.org/ bindownload.cgi. Ant is easy to install; simply unpack the distribution to a convenient location.

Because Ant is a program that you’ll use on a number of projects, you should make it available from any directory. To do this, add it to your path and then add an ANT_HOME environment variable as you did with CATALINA_HOME. It’s a good idea to set the entry in the path to ANT_HOME\bin to allow for any updates to Ant that you may make.

To test that you’ve installed Ant, type ant -version in a terminal window. If everything has gone to plan, you’ll see Ant’s usage message.

You won’t use Ant for anything but compiling the source code and deploying Web applications in this book, so you won’t see the details of it. However, you should be aware that it uses an XML file, called build.xml by default, to carry out its tasks.



Pro Jakarta Tomcat 5
Pro Apache Tomcat 5/5.5 (Experts Voice in Java)
ISBN: 1590593316
EAN: 2147483647
Year: 2004
Pages: 94

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net