Today I faced the same problem, the reason for this was the ANT_HOME path variable, explained in other answers.
I originally added ANT_HOME in 2 places listed below and it did not work.
window-> preferences β ant β runtime-> Tab Properties
window-> preferences β ant β runtime-> Classpath tab
But when I delete the Classpath ant tab of the home record (setting it by default using the Restore default option in the lower right settings window), it worked :). So far this is just a surprise for me, because I added the same ant home path in both places.
Vipin source share