After updating Eclipse on my laptop, all of a sudden the built-in version of Ant that ships with Eclipse stopped working.
I right-click on a
build.xml files, run it as Ant build but… nothing happens! I don’t get any message in the Eclipse Console (you know, the usual red ones telling you that you screwed up somewhere in the XML file). The only thing I get is a mysterious
<terminated> message in the view’s title, followed by the path to the Java executable on my machine.
I kept just using Ant from a shell until I decided it was time for some googling. After searching through bugs I found this comment on a bug, so here’s what you need to do:
- go to your Eclipse preferences
- go to Ant/Runtime
- in the “Classpath” tab, expand the “Ant Home Entries (Default)” list
- you should see a bunch of entries like
Applications/eclipse/plugins/org.apache.ant_x.y.z.v.../lib/ant*.jar: if you go check, that folder doesn’t exist!
- press “Add External JARs” and go to
/Applications/eclipse/plugins/, where you should find an
org.apache.ant_folder with a different version than that of the listed entries (in my case I have an
- select and add all jars in the
libfolder inside the
org.apache.ant_x.y.zfolder (the one from the previous step)
- select and remove all old jars (those from the non-existing folder), hit apply
now Ant should work again!
By the way, this should be the open bug that tracks this issue if you want to follow it.