How to Use Ant (when You Receive an Error about build.xml Not Existing)

Problem Scenario:  You want to use Ant to invoke your customized build.xml file.  But when you run it, you get "
Target "build.xml" does not exist in the project ..."
Solution:  Call ant with no other variables.  Do not use "ant build.xml".  Use "ant" by itself.
Miscellaneous:  Most CentOS/RedHat repositories will have Ant available.  As root, the command "yum install ant" should get it installed.  You will have to respond "y" to some of the prompts.  Here is a sample build.xml file that works with Ant.
<?xml version="1.0"?>
        <project name="Continual Integration Project" default="info">
        <target name ="info">
                <echo>You correctly invoked Ant!</echo>
        </target>
</project>

Leave a comment

Your email address will not be published. Required fields are marked *