使用ant 执行Junit测试的问题, build.xml如下:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="test" name="Test TestSmokeTestForServer">
    <import file="../BinaryRepositoryWS/build.xml"/>
    <property name="TESTDIR" value="."/>
    <property name="TEST-DEBUG" value="${TESTDIR}/ant-bin-debug"/>
    <property name="REPORTS-DIR" location="reports"/>
    <property name="LIB" value="lib" />
    <property name="SRC" value="src"/>
    <property name="JAVA_COMPILER_VERSION" value="1.6"/>
    <property name="DEBUG" value="false" />
    <property name="BUILD-DIR" value="ant-bin"/>
    <target name="test" depends="compile-test, run-test" />
    <target name="compile-test" depends="clean, mkdirs, compile"/>
    <target name="compile" depends="mkdirs">
        <javac target="${JAVA_COMPILER_VERSION}" srcdir="${SRC}" destdir="${BUILD-DIR}" debug="${DEBUG}">
        <classpath refid="webservice-classpath"/>
        <classpath refid="webservice-test-classpath"/>
        <classpath location="${BUILD-DIR}"/>
        </javac>
    </target>
    <target name="clean">
        <delete dir="${TEST-DEBUG}" />
        <delete dir="${REPORTS-DIR}" />
        <delete dir="${BUILD-DIR}"/>
    </target>
    <target name="mkdirs">
        <mkdir dir="${TEST-DEBUG}"/>
        <mkdir dir="${REPORTS-DIR}"/>
        <mkdir dir="${BUILD-DIR}"/>
    </target>
    <target name="run-test" depends="">
        <junit fork="yes" forkmode="perTest" printsummary="yes" haltonfailure="no" haltonerror="false" showoutput="true" >
        <classpath location="${TEST-DEBUG}"/>
        <classpath location="${BUILD-DIR}"/>
        <classpath location="${LIB}"/>
        <formatter type="xml" />
        <test name= "com.sonyericsson.binaryreposystem.client.TestSmokeTestForServer" />
        </junit>
    </target>
</project>
执行报错,build.xml:32: The <classpath> for <junit> must include junit.jar if not in Ant's own classpath
但是我已经下载了junit.jar 放到lib目录下了阿,
大家看看是什么问题呢。
谢谢!