成功捷径,贵在坚持
人为善,福虽未至祸已远离; 人为恶,祸虽未至福已远离

When running JUnit tasks in ant and you get the following error:

BUILD FAILED
path\to\Geoserver\build.xml:259: Could not create task or type of type: junit.
Ant could not find the task or a class this task relies upon.

To fix this problem, you need to copy a JUnit.jar file to your eclipse/plugins/org.apache.ant/lib directory
Next you need to go into Eclipse then click on Window->Preferences->ant->Runtime, then select 'Ant Home Entries (Default). Click on the button 'Add External JARs'. Locate the junit.jar file you copied, select it and hit 'OK'. Hit 'Apply', then 'OK' and try your ant task again. That should fix it.

posted on 2006-10-26 14:23 选宝网an9 阅读(2859) 评论(5)  编辑  收藏 所属分类: FRAMEWORK

FeedBack:
# re: Ant - junit, build failed= Could not create task or type of type junit
2007-12-12 16:15 | husband
谢谢  回复  更多评论
  
# re: Ant - junit, build failed= Could not create task or type of type junit
2008-11-24 15:09 | xxxxxx
非常感谢  回复  更多评论
  
# re: Ant - junit, build failed= Could not create task or type of type junit
2008-12-25 11:16 | rong
非常感谢  回复  更多评论
  
# re: Ant - junit, build failed= Could not create task or type of type junit
2009-04-20 23:36 | Leasen
thx million ~~~~~
  回复  更多评论
  
# re: Ant - junit, build failed= Could not create task or type of type junit
2009-08-19 21:34 | 3ks
use bcel.jar  回复  更多评论
  

只有注册用户登录后才能发表评论。


网站导航: