Installing Ant Under Linux

I l @ ve RuBoard

Unlike the JDK deployment, Ant is unpacked using tar rather than installed using rpm.

Downloading the Distribution

Point your browser to http://jakarta.apache.org/builds/jakarta-ant/release/v1.4.1/bin/ and select the binary tar.gz file. Save the file to /tmp.

Unpacking the Distribution

As root, cd to /usr/local (or another location where you want to deploy packages such as Ant) and then run this command:

 [root@linux local]# gunzip -c /tmp/jakarta-ant-1.4.1-bin.tar.gz  tar xf - 

This creates the directory /usr/local/jakarta-ant-1.4.1.

Adding Ant to PATH

Create the file /etc/profile.d/ant.sh as root with the following content:

 PATH="$PATH:/usr/local/jakarta-ant-1.4.1/bin" ANT_HOME=/usr/local/jakarta-ant-1.4.1/ export PATH ANT_HOME 

Testing Ant

Log out and then log back in. Type ant at a shell prompt. You should see the following:

 [turner@linux turner]$ ant Buildfile: build.xml does not exist! Build failed 

Again, as with Windows, this tells you that the binary for Ant is in place but that it didn't find a build.xml file in the current directory (which is what you would expect).

I l @ ve RuBoard


MySQL and JSP Web Applications. Data-Driven Programming Using Tomcat and MySQL
MySQL and JSP Web Applications: Data-Driven Programming Using Tomcat and MySQL
ISBN: 0672323095
EAN: 2147483647
Year: 2002
Pages: 203
Authors: James Turner

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