Today I finally got around to reconfiguring my local Ant install. I updated to the latest version and also configured Eclipse to use the same Ant files.
I’ve known you could do this for awhile but today I was talking to Qasim in our daily scrum and finally decided to take a bit of time to do this and document it on our internal WIKI so the whole team can get setup the same way.
Lets get started!
- First download the latest version of Ant.
- On Windows – unzip the download to a location on your local drive. I have: D:\ant
Next I have some additional Ant tasks (antcontrib, mail, etc) that require some additional jar files. You can copy those to your newly installed Ant lib directory: D:\ant\lib
Note: At some point I will probably move these additional tasks off to a network share so we can all reference the same tasks – but for now I’m going to KISS and just dump them in the local directory.
Now we need to configure Eclipse to point to our new installation of Ant instead of it’s own copy.
- Open Eclipse
- Click Window > Preferences
- Expand Ant
- Click Runtime
- Note Ant paths are local to Eclipse
- Click ‘Ant Home’
- Navigate to your newly installed Ant directory
- Select the Ant directory
- Click OK
- Click OK (exit Preferences)
- Verify your Ant tasks work!
Now you should be able to run the same tasks from the command line or from within Eclipse and use the same task extensions.


Nice. I wrote about how to do exactly the opposite a while back just to reduce the number of Ant installs I had laying around. :-)
Pingback: trace(chris.foster) » Tortoise SVN 1.5 and ANT SVN task - Format version mismatch
Glad to hear that you were able to set up a central ANT installation. By the way thanks for explaining this publicly – I am sure a lot of people will benefit from this write up.
Superb! Saved me hours of experimenting with Eclipse.