javaeclipseantbuildcontinuous-integration

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.

Solution

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