ant installation error
Posted by regis012 on 2012/1/2 10:26:30
Hi,
I installed the new ant version like that Quote:
I tried to make a compilation
Quote:
Class org.apache.tools.ant.taskdefs.ConditionTask doesn't support the nested "antversion" element.
I enter the command :
Quote:
Result
Quote:
Apache Ant version 1.6.5 compiled on January 6 2007
Why the ant version is 1.6.5 ??? I installed the 1.8.2 version ????
I didn't forget to change ANT_HOME like Quote:
export ANT_HOME=/usr/local/ant
Please, help me

Thank you in advance
Re: ant installation error
Posted by pschaff on 2012/1/2 21:51:46
Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature, and read about
Installing Software and
Repositories, and note the warnings and advice about installing and configuring the
yum priorities plugin. Non-core repos should have a higher numeric value, which is a lower priority. Lower is "better" as in golf scores.
Please pay particular attention to the evils of
Source Installs. Source installs as root are especially dangerous, but looks like yours is confined to /usr/local so it is probably harmless.
There are standard and 3rd party ant packages available. Apparently you have the standard package installed and that is being found before your source install. I don't see 1.8.2 in the repos so you either need to make your version work or
rebuild from a source RPM if you require the later version.
You need /usr/local/ant/bin (or wherever the ant bin directory lives) on your path before /usr/bin where the default ant binary is found. You may also need to adjust the library path.
Re: ant installation error
Posted by howieu on 2012/1/6 21:01:23
do a "which ant" to find out where it's running from. You should probably (re) link that to your ant installation.
Re: ant installation error
Posted by pschaff on 2012/1/6 21:27:04
Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.
I must respectfully disagree. Changing the path to find the non-standard installation first is preferable to manually clobbering a component of an installed package with a link.
Re: ant installation error
Posted by anil on 2013/2/21 6:33:12
Hello, I have a similar problem i have a newer ANT in /usr/local/ant .... when did "which ant" it showed me that its still pointing to the default ANT "usr/bin/ant" installed with the Centos. How do i change it ?
I do understand that Changing the path to find the non-standard installation first is not preferable as mentioned by pschaff, but we have to get this done. Kindly help with this.
Re: ant installation error
Posted by gerald_clark on 2013/2/21 14:21:50
You misunderstood the post. He said "is preferable" not "is not preferable".
Re: ant installation error
Posted by anil on 2013/2/28 9:39:06
Ok

. How do I actually go about it. Tried changing ANT_HOME but still same issue, points to the older version.
Re: ant installation error
Posted by anil on 2013/2/28 14:44:07
Got it. It was issue with the PATH variable,
export PATH=$PATH:/usr/local/ant/bin.
Changing it to
export PATH=/usr/local/ant/bin:$PATH
Did the trick. Thanks.
This Post was from: https://www.centos.org/newbb/viewtopic.php?forum=37&topic_id=35034