Apache Ant error on Yosemite

Try uninstalling ant and then reinstalling it. I’m working with Yosemite, same ant version and same java version. Running and from command line should give you the following result:

xxxx-MacBook-Pro:~ xxxx$ ant
Buildfile: build.xml does not exist!
Build failed