tags:

views:

15

answers:

1

i am trying to do the spring tutorials from the spring website. one of the tutorials include bulding an ant build file which when i build I keep getting this error

BUILD FAILED
build.xml:146: You must not specify nested elements when using refid

When i click on the error it seems to be pointing at this location

<target name="tests" depends="build,buildtests"  description="Run tests">
    <junit printsummary="on" 
        fork="false" 
        haltonfailure="false" 
        failureproperty="tests.failed" 
        showoutput="true">

        <classpath refid="master-classpath"/>
        <formatter type="brief" usefile="false"/>

        <batchtest>
            <fileset refid="master-classpath">
                <include name="**/*Tests.*"/>
            </fileset>  
        </batchtest>
    </junit>

    <fail if="tests.failed">
        tests.failed=${tests.failed}
        ***********************************************************
        ***********************************************************
        ****  One or more tests failed!  Check the output ...  ****
        ***********************************************************
        ***********************************************************
    </fail>
</target>

any clues why this error is generated?

+1  A: 

Ok i figured out the problem.

        <batchtest>
            <fileset dir="master-classpath">
                <include name="**/*Tests.*"/>
            </fileset>  
        </batchtest>

I originally used refid="master-classpath" which is wrong.

Thanks

ziggy