Eclipse 环境中junit 结合ant bulit失败原因解释!
来源:互联网 发布:淘宝绿球藻有真的吗 编辑:程序博客网 时间:2024/06/08 16:23
1.最近研究APPFUSE 框架。 导入Eclipse内,使用ant当中的test任务。执行都是失败。显示要求你把junit.JAR放入ANT_HOME/LIB下面,但是扔进去后还是不行。test-dao,test-web等仍无都跑不起来。直接就:
----------------------------------------------
Could not create task or type of type: junit.
Ant could not find the task or a class this task relies upon.
This is common and has a number of causes; the usual
solutions are to read the manual pages then download and
install needed JAR files, or fix the build file:
- You have misspelt 'junit'.
Fix: check your spelling.
- The task needs an external JAR file to execute
and this is not found at the right place in the classpath.
Fix: check the documentation for dependencies.
Fix: declare the task.
- The task is an Ant optional task and the JAR file and/or libraries
implementing the functionality were not found at the time you
yourself built your installation of Ant from the Ant sources.
Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the
task and make sure it contains more than merely a META-INF/MANIFEST.MF.
If all it contains is the manifest, then rebuild Ant with the needed
libraries present in ${ant.home}/lib/optional/ , or alternatively,
download a pre-built release version from apache.org
- The build file was written for a later version of Ant
Fix: upgrade to at least the latest release version of Ant
- The task is not an Ant core or optional task
and needs to be declared using <taskdef>.
- You are attempting to use a task defined using
<presetdef> or <macrodef> but have spelt wrong or not
defined it at the point of use
Remember that for JAR files to be visible to Ant tasks implemented
in ANT_HOME/lib, the files must be in the same directory or on the
classpath
Please neither file bug reports on this problem, nor email the
Ant mailing lists, until all of these causes have been explored,
as this is not an Ant bug.
---------------------------------------------
2.然后再试着看看是不是少了ant_junit.jar.检查完无问题。FT了
3.外部窗口执行ANT TEST-DAO,.................等...................结果OK.
原来一个菜错误发生在Eclipse身上,要在Eclipse里面的ant中设定这个ant的jar包路径。晕。bug啊!
ok。U may do LIKE THIS:
-------------------------------------------------------------------------------------------------------------------------------------
go to Window --> Preferences, Ant --> Runtime
. In the Classpath
tab click on Global Entries
and then Add External JARs...
.
-----------------------------------------------------------------------------------------------------------------------------
- Eclipse 环境中junit 结合ant bulit失败原因解释!
- JUnit和ant结合
- Ant与Junit结合
- Springtest与junit结合测试注解失败原因
- Springtest与junit结合测试注解失败原因
- eclipse中ant无法执行junit标签
- 配置ant失败原因
- 在Eclipse中配置ant完成junit测试
- 在eclipse中调试ant中的junit测试代码
- ANT的使用(结合JUNIT、SVN)
- ant结合junit进行软件自动测试
- Ant和JUnit结合进行单元测试
- ant之入门2-结合junit
- JUnit测试失败的两种原因
- Eclipse, ANT , Junit构建自动化单元测试
- Eclipse下用Ant运行JUnit
- Ant和JUnit结合进行单元测试 ant 软件包 org.junit 不存在
- jenkins构建失败原因: invoke ant
- TreeView(一次性递归所有节点)
- [2006-09-26]系统分析员考试复习,进入攻坚阶段!
- 数据访层
- 流程图
- Windows API函数大全---附:windows运行命令详解
- Eclipse 环境中junit 结合ant bulit失败原因解释!
- SQL Server .NET Framework 数据提供程序连接池
- csc.exe编译参数的问题
- 优化ASP.NET应用程序性能研究与探讨
- sqlserver调用外部存储过程
- 用vc6写windows service程序
- 手表与嫁女
- 鼠标拖动
- Linux音频编程指南