Manually installing Ant 1.8.4 on Ubuntu 12.04

My handy step guide for installing Ant.

Step1: Download a fresh copy

1
$> wget http://apache.heikorichter.name/ant/binaries/apache-ant-1.8.4-bin.tar.gz

Step 2: Extract distribution archive

Extract the distribution archive apache-ant-1.8.4-bin.tar.gz to a more appropriate directory, in my case /usr/local

1
2
$> tar xvfz apache-ant-1.8.4-bin.tar.gz
$> sudo mv apache-ant-1.8.4 /usr/local

Step3: Setup Ant Home

Edit file ~/.profile and add following lines:

1
2
ANT_HOME="/usr/local/apache-ant-1.8.4"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:$ANT_HOME/bin"

Remember load your profile changes source ~/.profile

1
$> source ~/.profile

Step4: Verify installation

Now run ant -version in a terminal and you will get something like following

1
2
$> ant -version
Apache Ant(TM) version 1.8.4 compiled on May 22 2012

Have fun!