2
我正試圖讓Spring MVC和Junit與eachother一起工作,並且在配置build.xml文件時遇到了問題。我在使用ANT方面相當新,並且不太瞭解所有的教程。我將junit.jar文件放在lib direcotory中,但仍然從我的控制檯收到以下消息。不能讓Junit在ANT構建中與Spring一起工作
test:
BUILD FAILED
C:\Java\mmz\WEB-INF\build.xml:63: The <classpath> for <junit> must include junit.jar if not in Ant's own classpath
Total time: 223 milliseconds
編輯
這裏是希望的一個例子,僅運行一個測試
,我不知道我需要做的,我試圖做類似下面的,但我不太明白它在做什麼,所以我不知道如何做出改變
<path id="classpath.test">
<pathelement location="" />
<pathelement location="${test.dir}" />
</path>
<target name="test">
<junit>
<classpath refid="classpath.test" />
<formatter type="brief" usefile="false" />
<test name="TesterTest" />
</junit>
</target>
我很迷茫下一步該做什麼。謝謝
您能否包含build.xml中包含junit任務聲明的部分?你是否在其中聲明瞭一個「」部分? –
2010-08-19 04:55:40
我不確定春天到了哪裏。 – skaffman 2010-08-19 08:41:14