已运行数月的Ant junit任务突然失败,因为曾经发现类的NoClassDefFoundError。有没有办法显示在junit任务中构建的类路径?如何在Ant Junit任务中显示类路径构建
<target name="basic-junit-test" description="Run a single JUnit test. ">
<junit printsummary="yes" fork="no" haltonfailure="yes">
<classpath>
<pathelement location="target/WEB-INF/lib/log4j-1.2.16.jar"/>
.
. many other pathelements
.
</classpath>
<test name="com.mycompany.command.TestUNLOCKACCOUNTCommand" outfile="${report.dir}/junit_test_results" />
</junit>
</target>
Mark,感谢您的回复。我会试一试。你能告诉我如何在调试模式下从Eclipse运行Ant吗? – user903724
要在调试模式下在Eclipse中运行Ant,请在Ant编辑器中使用=> AntFile |上下文菜单|运行为| 2 Ant Build ... |主标签|参数=> -debug然后运行 – Rebse
Rebse,这是非常有用的。在调试模式下打印的信息正是我所需要的。 – user903724