CentOS how to update Ant Version to 1.8.x and higher?

Awk's answer may probably work, but for some reason, it's not working for me. Then i found this (a bit different) answer by Googling.

  1. Download “bin” Release from http://ant.apache.org/bindownload.cgi
  2. Extract & copy/move the whole folder (apache-ant-1.9xxxxx) into /opt/. So there will be /opt/apache-ant-1.9xxxxxx/
  3. Make a Symlink: ln -s /opt/apache-ant-1.9.xxxxx /opt/ant
  4. Make another Symlink: ln -s /opt/ant/bin/ant /usr/bin/ant
  5. Set ANT_HOME into the Environment vi /etc/environment and add this line: ANT_HOME=/opt/ant (without trailing slash)
  6. Re-login to initiate the Environment.

That one perfectly works for me.