My O.S. version is Ubuntu 14.04 LTS.
My Apache ant version is 1.9.3.
ant -version
Apache Ant(TM) version 1.9.3 compiled on April 8 2014
I want to update my Apache ant 1.9.4.(onwards)
Please help me, because when I'm using sudo apt-get install ant
to update my ant.
But after this sudo command ant it showing following messages.
ant is already the newest version.
The following packages were automatically installed and are no longer
required:aspectj eclipse-platform-data eclipse-rcp fastjar jarwrapper junit4
libasm3-java libaspectj-java libbonoboui2-0 libbonoboui2-common
libcommons-beanutils-java libcommons-cli-java libcommons-codec-java
libcommons-collections3-java libcommons-compress-java
libcommons-dbcp-java libcommons-digester-java
libcommons-httpclient-java libcommons-lang-java libcommons-pool-java
libdb-java libdb-je-java libdb5.3-java libdb5.3-java-jni
libeasymock-java libecj-java libequinox-osgi-java
libfelix-bundlerepository-java libfelix-gogo-command-java
libfelix-gogo-runtime-java libfelix-gogo-shell-java
libfelix-osgi-obr-java libfelix-shell-java libfelix-utils-java
libgeronimo-jpa-2.0-spec-java libgeronimo-jta-1.1-spec-java
libgeronimo-osgi-support-java libglade2-0 libgnomecanvas2-0
libgnomecanvas2-common libgnomeui-0 libgnomeui-common
libhamcrest-java libicu4j-4.4-java libicu4j-java libjetty8-java
libjline-java libjtidy-java libkxml2-java liblucene2-java
libosgi-compendium-java libosgi-core-java libosgi-foundation-ee-java
libservlet2.5-java libswt-cairo-gtk-3-jni libswt-glx-gtk-3-jni
libswt-gnome-gtk-3-jni libswt-gtk-3-java libswt-gtk-3-jni
libswt-webkit-gtk-3-jni libtomcat7-java libxz-java
linux-headers-3.13.0-32 linux-headers-3.13.0-32-generic
linux-image-3.13.0-32-generic linux-image-extra-3.13.0-32-generic
linux-signed-image-3.13.0-32-generic sat4j Use 'apt-get autoremove'
to remove them. 0 upgraded, 0 newly installed, 0 to remove and 7 not
upgraded.
Best Answer
Open up a Terminal with (Ctrl + t)
Remove the installed Ant either by remove or purge:
The output should be something like
(I have a jar file in '/usr/share/ant/lib' which I need so I didn't clean that up.)
Download, verify signature, unpack and put the Apache Ant to for example /opt/ (According to their website it is suggested to use the latest version, but we specifically need 1.9.4, right? :-))
More information about Apache Signature Verifying:
https://www.apache.org/info/verification.html
Create a symlink to your bin folder so your programs can call it
Usually your programs will need the ANT_HOME and ANT_OPTS environment variables:
To make it permanent put the above lines to ~/.bashrc. Here are the commands to do this: Either use an editor to edit .bashrc or from command line, just use the below commands.
Create a backup of .bashrc, before doing anything with it.
Verify that the changes are correct
The output should be something like:
Restart the Terminal or source the .bashrc
Verify the installation: