<project name="ant-task-test"
         default="default-target">

    <target name="default-target">
        <echo message="In default target."/>
    </target>

    <target name="echo-test">
        <echo message="Hello, hello, hello"/>
    </target>

    <!-- Test <ant> on this build file. -->
    <target name="ant-samefile-test">
        <!-- Default target -->
        <ant antfile="ant-task-test.xml"/>

        <!-- Named target -->
        <ant antfile="ant-task-test.xml" target="echo-test"/>
    </target>

    <!-- Test <ant> on another build file. -->
    <target name="ant-otherfile-test">
        <!-- Full path to file. -->
        <ant antfile="subdir/build.xml"/>

        <!-- Dir and file specified -->
        <ant dir="subdir" antfile="build.xml"/>

        <!-- Dir with default filename -->
        <ant dir="subdir"/>

        <!-- Call named target -->
        <ant antfile="subdir/build.xml" target="echo"/>
    </target>

    <!-- Test <ant> with property overrides -->
    <target name="ant-setprops-test">
        <!-- No property overrides -->
        <ant antfile="subdir/build.xml" target="property-test"/>

        <!-- Override property within task def -->
        <ant antfile="subdir/build.xml" target="property-test">
            <property name="test-prop" value="set in calling task"/>
        </ant>

        <!-- Override property in containing project -->
        <property name="test-prop" value="set in calling target"/>
        <ant antfile="subdir/build.xml" target="property-test"/>

        <!-- Test inherit-all = false -->
        <ant antfile="subdir/build.xml" target="property-test"
             inheritall="false"/>
    </target>

</project>
