2007-04-27

在eclipse中使用ant的<junit> task

关键字: eclipse junit task

build.xml中定义junit task

<taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>

默认情况下会报错

eclipse org.apache.tools.ant.taskdefs.optional.junit.JUnitTask cannot be found: junit/ framework/TestListener

解决方案:

 Window --> Preferences, Ant --> Runtime-->Classpath-->Global Entries

添加junit.jar

评论
hama
搜索本博客
最近加入圈子
存档
最新评论