How to install ant 1.8 on Ubuntu 11.04 properly

1

I have attempted to install ant 1.8 on a Ubuntu 11.04 box using these instructions:

http://www.thegeekwork.com/how-to-install-ant-1-8-2-using-ppa-on-ubuntu/

And when I list what it has installed, I get the following:

$ dpkg -L ant
/.
/usr
/usr/bin
/usr/share
/usr/share/maven-repo
/usr/share/maven-repo/org
/usr/share/maven-repo/org/apache
/usr/share/maven-repo/org/apache/ant
/usr/share/maven-repo/org/apache/ant/ant
/usr/share/maven-repo/org/apache/ant/ant/1.8.2
/usr/share/maven-repo/org/apache/ant/ant/1.8.2/ant-1.8.2.pom
/usr/share/maven-repo/org/apache/ant/ant/debian
/usr/share/maven-repo/org/apache/ant/ant/debian/ant-debian.pom
/usr/share/maven-repo/org/apache/ant/ant-launcher
/usr/share/maven-repo/org/apache/ant/ant-launcher/1.8.2
/usr/share/maven-repo/org/apache/ant/ant-launcher/1.8.2/ant-launcher-1.8.2.pom
/usr/share/maven-repo/org/apache/ant/ant-launcher/debian
/usr/share/maven-repo/org/apache/ant/ant-launcher/debian/ant-launcher-debian.pom
/usr/share/maven-repo/org/apache/ant/ant-parent
/usr/share/maven-repo/org/apache/ant/ant-parent/1.8.2
/usr/share/maven-repo/org/apache/ant/ant-parent/1.8.2/ant-parent-1.8.2.pom
/usr/share/maven-repo/org/apache/ant/ant-parent/debian
/usr/share/maven-repo/org/apache/ant/ant-parent/debian/ant-parent-debian.pom
/usr/share/ant
/usr/share/ant/bin
/usr/share/ant/bin/ant
/usr/share/ant/bin/complete-ant-cmd.pl
/usr/share/ant/bin/antRun
/usr/share/ant/bin/antRun.pl
/usr/share/ant/bin/runant.pl
/usr/share/ant/lib
/usr/share/ant/etc
/usr/share/ant/etc/ant-bootstrap.jar
/usr/share/doc
/usr/share/doc/ant
/usr/share/doc/ant/copyright
/usr/share/doc/ant/README.gz
/usr/share/doc/ant/README.Debian
/usr/share/doc/ant/changelog.Debian.gz
/usr/share/man
/usr/share/man/man5
/usr/share/man/man5/build.xml.5.gz
/usr/share/man/man1
/usr/share/man/man1/ant.1.gz
/usr/share/java
/usr/share/java/ant-launcher-1.8.2.jar
/usr/share/java/ant-1.8.2.jar
/usr/bin/ant
/usr/share/maven-repo/org/apache/ant/ant/1.8.2/ant-1.8.2.jar
/usr/share/maven-repo/org/apache/ant/ant/debian/ant-debian.jar
/usr/share/maven-repo/org/apache/ant/ant-launcher/1.8.2/ant-launcher-1.8.2.jar
/usr/share/maven-repo/org/apache/ant/ant-launcher/debian/ant-launcher-debian.jar
/usr/share/ant/lib/ant-launcher.jar
/usr/share/ant/lib/ant.jar
/usr/share/java/ant-launcher.jar
/usr/share/java/ant.jar
/usr/share/java/ant-bootstrap.jar

Thus seemingly ant 1.8 has been installed. However, when I check the version of ant, I still get ant 1.7:

$ /usr/bin/ant -version
Apache Ant version 1.7.0 compiled on December 13 2006

Any ideas on how to get a hold of ant 1.8 on this box?

Thanks!

bguiz

Posted 2012-07-09T00:52:37.300

Reputation: 1 651

Answers

1

Are you sure you are using 11.04 ?. Because by default, natty is having ant 1.8. If you are using any older version of Ubuntu then you can install ant from Ubuntu repositories itself, using

sudo apt-get install ant1.8

If you have issue on 11.04, try removing ant1.7. By default, ant in 11.04 is 1.8.1. Otherwise if you specifically need ant1.8 from that ppa, you can remove your existing ant, ant1.7 and install it.

Jishnu

Posted 2012-07-09T00:52:37.300

Reputation: 146