How to upgrade the ant built into eclipse?

21,656

Solution 1

Download and unpack the latest ant build anywhere on your hard disk, then run Eclipse, and go to

Window > Preferences > Ant > Runtime 

and click on the button called

Ant Home

Browse to the ant folder that you just unpacked, and choose that folder. Now Eclipse will use this version of ant instead of the built-in ant. I use this way, and actually prefer it, because now I have the same ant version in command line and in Eclipse

In the same window you can add any other jars with 3rd party ant tasks, and they will be used by ant (just 'add jars'/'add external jars')

Solution 2

While not easy, by my standards at least, this is the way to update the ant plugin. At least for RAD 8.5, I'm sure eclipse is similar.

Go to Help -> About RAD -> Intallation details -> Plugins ... locate the org.apache.ant plugin version you are using. Note the Provider ... in this case for me it was Eclipse Orbit.

Next you need the repository URL for Orbit, googling got me this page.

http://wiki.eclipse.org/Orbit/FAQ

Which describes how to locate the repository.

Find the Orbit build drop that you need here: 
http://download.eclipse.org/tools/orbit/downloads/

Add 'repository' to the URL of the drop. For example, for the drop in 

http://download.eclipse.org/tools/orbit/downloads/drops/S20101204061544/ 

the URL that you would use is: 
http://download.eclipse.org/tools/orbit/downloads/drops/S20101204061544/repository/ 

I personally went with

http://download.eclipse.org/tools/orbit/downloads/drops/R20130827064939/repository

Next, if you are behind a proxy, make sure that your proxy config is correct and the IDE can connect to the internet.

Then go to Help -> Install New Software

Next to the Work With dropdown hit the Add button and enter the repository information.

Select the apache bundle from the list and complete the steps of the wizard to perform the update.

Now that the repository is added to the list, for future updates you can use the Help -> Check for Updates menu item.

Good Luck, took me a day to figure that out and work through it.

Share:
21,656

Related videos on Youtube

ams
Author by

ams

I love software development.

Updated on April 22, 2020

Comments

  • ams
    ams about 4 years

    I use ANT for all my builds and I also use eclipse as my IDE and I would like to be able to use the latest version of ANT in my eclipse, frequently the ANT that ships with eclipse is a point release behind. so my questions are.

    1. Is there an easy way to get the eclipse ant plug-in to use the latest version of ANT?
    2. Is there any easy way to add extra custom ant libraries to the built in eclipse ANT plug in, as I would like to be able to add things like the subversion task to my ant build and have it accessible from within eclipse.
  • mgaert
    mgaert over 12 years
    This is OK, but not complete? If you develop your own Ant tasks in your project, then somehow the built-in, older version is still used. That is, code completion does not show additional signatures, and internal compiler Errors are shown. Example: On Eclipse 3.6 (supposedly on Ant 1.7.1), derive a class from org.apache.tools.ant.taskdefs.Javac. Then try to access super.setErrorProperty("x"). This does not work?! This is strange, as Ant doc says that this property is present even in Ant 1.7.1.
  • Ripon Al Wasim
    Ripon Al Wasim almost 12 years
    Yes, this is the better and easier way to upgrade Ant with eclipse
  • James Gawron
    James Gawron over 10 years
    Code completion on custom ant tasks is probably still dependent on your Java Build Path in Project Properties ...