I've downloaded the last apache ant version on my Mac but the version seems the old one. Any idea?
myMac:~ mauri$ brew install ant
==> Downloading https://homebrew.bintray.com/bottles/ant-1.9.7.el_capitan.bottle.tar.gz
######################################################################## 100,0%
==> Pouring ant-1.9.7.el_capitan.bottle.tar.gz
I realized after relooking at the post, that you tried to install ant, it has downloaded
ant 1.9.7
version and extraction seemed to be/usr/local/Cellar/ant/1.9.7
.Or you may use the downloaded directory which is
/Users/mauri/Downloads/apache-ant-1.9.6
So, all you need to do is to set the environment variables to the right installation path.
Run the following commands on the terminal.
Now
ant -v
should give right result.Note that the above changes are only for the command session. If you want to apply it permanently, then update the same in your
~/.bash_profile
file.UPDATE:
If the is continue to persist(i.e., referring to older version of ant), it is possible to have softlink to older version. Try to remove that.
I'm still trying to the reason behind that, but The Ant wrapper script sources some files from /etc if present, so the global installation may leak into your setup regardless. I guess the key is
file:/Library/Java/Extensions/selenium-html-runner-3.0.1.jar" - whatever has put Selenium there, it takes precedence. I want to thank Stefan Bodewig from Apache ANT for this great insight