Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upgrade the ant built into eclipse?

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.
like image 392
ams Avatar asked Mar 05 '11 20:03

ams


People also ask

How do I update ant in Eclipse?

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.

Is Ant installed with Eclipse?

Ant is integrated into eclipse. If you go to the Window menu, ant should be one of the views available to open.


2 Answers

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')

like image 114
Maxym Avatar answered Oct 07 '22 19:10

Maxym


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.

like image 45
James Gawron Avatar answered Oct 07 '22 21:10

James Gawron