Chapter 5: Fixing Java and ANT
Installing Ant
Ant is a 'make like' tool for Java development. It is required to compile the source of some components of the Globus Toolkit. When the default java was removed more then likely so was ant and that is desired.
You should download version 1.6.5 or better of the ant tool. You can download version 1.6.5 using the 'wget' command:
Note: The following code appears on multiple lines, but it is 'one' line of code
[root@nodeB ~]# wget http://apache.mirrormax.net/ant/binaries/apache-ant-1.6.5-bin.tar.bz2
The file should look like this:
[root@nodeB opt]# ls -l apache-ant-1.6.5-bin.tar.bz2
-rw-r--r-- 1 root root 6743024 Jun 2 2005 apache-ant-1.6.5-bin.tar.bz2
The md5 checksum should be this:
[root@nodeB opt]# md5sum apache-ant-1.6.5-bin.tar.bz2
26031ee1a2fd248ad0cc2e7f17c44c39 apache-ant-1.6.5-bin.tar.bz2
Move the tarball to the /opt directory and unpack it:
[root@nodeB ~]# mv apache-ant-1.6.5-bin.tar.bz2 /opt/
[root@nodeB ~]# cd /opt/
[root@nodeB opt]# tar -jxf apache-ant-1.6.5-bin.tar.bz2
After unpacking the ditribution should look like this:
[root@nodeB opt]# ls -l apache-ant-1.6.5
total 208 |
| drwxr-xr-x |
2 |
root |
root |
4096 |
Feb 20 11:32 |
bin |
| drwxr-xr-x |
6 |
root |
root |
4096 |
Feb 20 11:32 |
docs |
| drwxr-xr-x |
3 |
root |
root |
4096 |
Feb 20 11:32 |
etc |
| -rw-r--r-- |
1 |
root |
root |
126 |
Jun 2 2005 |
INSTALL |
| -rw-r--r-- |
1 |
root |
root |
17191 |
Jun 2 2005 |
KEYS |
| drwxr-xr-x |
2 |
root |
root |
4096 |
Feb 20 11:32 |
lib |
| -rw-r--r-- |
1 |
root |
root |
11766 |
Jun 2 2005 |
LICENSE |
| -rw-r--r-- |
1 |
root |
root |
3356 |
Jun 2 2005 |
LICENSE.dom |
| -rw-r--r-- |
1 |
root |
root |
677 |
Jun 2 2005 |
LICENSE.sax |
| -rw-r--r-- |
1 |
root |
root |
2698 |
Jun 2 2005 |
LICENSE.xerces |
| -rw-r--r-- |
1 |
root |
root |
747 |
Jun 2 2005 |
NOTICE |
| -rw-r--r-- |
1 |
root |
root |
2657 |
Jun 2 2005 |
README |
| -rw-r--r-- |
1 |
root |
root |
289 |
Jun 2 2005 |
TODO |
| -rw-r--r-- |
1 |
root |
root |
18478 |
Jun 2 2005 |
welcome.html |
| -rw-r--r-- |
1 |
root |
root |
109297 |
Jun 2 2005 |
WHATSNEW |
Next set up your environment so that ANT_HOME is defined and the ant tools are in your PATH:
[root@nodeB opt]# export ANT_HOME=/opt/apache-ant-1.6.5
[root@nodeB opt]# export PATH=$ANT_HOME/bin:$PATH
[root@nodeB opt]# which ant
/opt/apache-ant-1.6.5/bin/ant
[root@nodeB opt]# ant -version
Apache Ant version 1.6.5 compiled on June 2 2005
|