ant junit task error
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?
I figured out the solution.
<batchtest>
<fileset dir="master-classpath">
<include name="**/*Tests.*"/>
</fileset>
</batchtest>
I originally used refid="master-classpath"
, which is wrong.
精彩评论