Friday, April 5, 2013

Error encountered when running ant on CentOS 5

Apache Ant is a Java library and command-line tool whose mission is to drive processes described in build files as targets and extension points dependent upon each other.

After yum installing the following packages

# yum install ant javacc
which will install the package ant-1.6.5-2jpp.2.x86_64.rpm, javacc.x86_64 0:4.0-3jpp.3.rpm

When I type ant, I encountered the following error
/usr/bin/build-classpath: error: Could not find xml-commons-apis Java
>> extension for this JVM

Solution:
---------
# yum install xml-commons xml-comms-apis

$ ant
Buildfile: build.xml does not exist!
Build failed


I think you can specify the ants using the ant -f "build_file"

No comments: