Bug 58904 - ant -version always reports version 1.7.1
Summary: ant -version always reports version 1.7.1
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core (show other bugs)
Version: 1.9.6
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
Depends on:
Reported: 2016-01-21 19:46 UTC by zielot
Modified: 2016-01-21 20:31 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description zielot 2016-01-21 19:46:58 UTC
* Download http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.5-bin.tar.gz
* check sha1sum 
  - numbers match

* run the following
  echo $ANT_HOME 
  $which ant

  $ ant -version
  Apache Ant version 1.7.1 compiled on June 27 2008

  $ /opt/ant/apache-ant-1.9.5/bin/ant -version
  Apache Ant version 1.7.1 compiled on June 27 2008

* same problem with 
Comment 1 zielot 2016-01-21 20:08:45 UTC
$ java -jar /opt/ant/apache-ant-1.9.4/lib/ant-launcher.jar -version
Apache Ant(TM) version 1.9.4 compiled on April 29 2014
Comment 2 zielot 2016-01-21 20:10:46 UTC
$ find /opt -iname "ant"
Comment 3 zielot 2016-01-21 20:31:00 UTC
I deleted the contents of the other ant installations and now I get the proper version so it works. However, this handling by the run script seems entirely wrong to me: the ant script should not be overriding the user's specific request to use a specific version. When I run 
/opt/ant/apache-ant-1.9.5/bin/ant -version
I am clearly not asking the script to search for all possible installations of ANT and try to run the oldest version.