Monday, July 20, 2009

build.xml does not exist! - Apache Ant

Problem: When trying to run a command with ant after installation, you might see this error:
Buildfile: build.xml does not exist!
Build failed

Solution/Explanation: This message is showing you that ant works and that it is looking for your project file. The documentation by Apache gives this explanation:
You can check the basic installation with opening a new shell and typing ant. You should get a message like this
Buildfile: build.xml does not exist!
Build failed
So Ant works. This message is there because you need to write an individual build file for your project. With a ant -version you should get an output like
Apache Ant version 1.7.0 compiled on December 13 2006
You can see that this is not really an error but just a notification.

3 comments:

seppinator1111 said...

OK, that's great and all, but how do I fix it so my project will run?

Michael Corrigan said...

It will depend on your project. You will need to generate a project file if one does not exist.

AbodoChickenMania said...

its good to know that the build file is project dependent. and doesnt have any thing to do with proper installation of ant.
i have verified the installation with
ant -version