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?
cheers
Andrew Monkhouse
author and jackaroo
Marshal Commander
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.
One of the most odious afflictions that Business has inflicted on the modern English language is "pro-active". Most of the time it's simply redundantly used in place of the simple old word "active". And a good deal of the rest of the time it means "You're not overworked enough yet, so go out and find more!"