Hey i'm trying to get ant installed on my centos box
preinstalled came a ant 1.7 but now i want to upgrade it to 1.8 (just for the heck of it)
i downloaded the tarball and unpacked it in /usr/local/ant and set my system variables in the /root/.bash_profiles
however if i run ant -version i still get ant 1.7 how can i make sure my default is 1.8?
I take it you are logging in to your CentOS box as root, and running Java that way. This will cause you problems down the line, however it is not directly related to your problem so I won't comment further at this time.
What changes did you make to your .bash_profile? Note - singular, not plural. If you changed .bash_profiles then you modified the wrong file.
Did you re-source the .bash_profile file after modifying it? That is:
I'm in agreement with Peter. I am a VERY big fan of the RPM package manager, but the one place where I avoid it is for Java stuff (except for my own code). One of the reasons I do that is because the OS provider generally doesn't give you the most up-to-date version of the software. An extreme case, in fact, was Sun's Solaris 10, which came with Tomcat4 as the packaged server even though Tomcat4 had already passed End of Life (ironic, much?).
To run your own version of Ant, however, you can do this:
1. Download the desired Ant archive.
2. Explode it (I usually end up with /usr/local/apache-ant-x.y.z).
3. Set your environment variable for ANT_HOME to be the directory named in Step 2.
4. Add $ANT_HOME/bin to your PATH at the HEAD of the path (so that it will override the other Ant version). Also, of course, you need to have $JAVA_HOME/bin setup for whichever JVM Ant should be running under.
Items 3 and 4 can be done in build script or in your profile, whichever is most convenient.
Customer surveys are for companies who didn't pay proper attention to begin with.