ant 脚本taskdef 和类名未找到
我对taskdef和classname不太熟悉...我在从另一个ant脚本运行ant脚本时遇到问题:
2011-05-25 15:50:26,040 [Thread-23] WARN ScriptRunner - BUILD FAILED
2011-05-25 15:50:26,040 [Thread-23] WARN ScriptRunner - C:\Work\6.70_Extensions\NightlyBuild\nightly_build.xml:31: The following error occurred while executing this line:
2011-05-25 15:50:26,040 [Thread-23] WARN ScriptRunner - C:\Work\6.70_Extensions\NightlyBuild\Master Build.xml:6: taskdef class com.ANT_Tasks.CFileEdit cannot be found
其中第6行是:
<taskdef mame="CFileEdit" classname="com.ANT_Tasks.CFileEdit" />
我的根目录是C:\Work\6.70_Extensions\NightlyBuild,我有一个文件夹C: \Work\6.70_Extensions\NightlyBuild\com\ANT_Tasks ,我在该文件夹中有一个 CFileEdit.java 。有人知道出了什么问题吗?
编辑:
我不想更改 ANT 脚本的结构,因此下一步是什么?
- 我将我的 CFileEdit.java 文件编译为 CFileEdit.class
- 我将 CFileEdit.class 转换为 CFileEdit.jar
- 我将此 CFileEdit.jar 放入 C:\apache-ant-1.8.2\lib 这是我的 ant 目录?
请告诉我我这样做是对还是错,我目前遇到了问题
i am not very familar with taskdef and classname... i am having trouble running an ant script from another ant script:
2011-05-25 15:50:26,040 [Thread-23] WARN ScriptRunner - BUILD FAILED
2011-05-25 15:50:26,040 [Thread-23] WARN ScriptRunner - C:\Work\6.70_Extensions\NightlyBuild\nightly_build.xml:31: The following error occurred while executing this line:
2011-05-25 15:50:26,040 [Thread-23] WARN ScriptRunner - C:\Work\6.70_Extensions\NightlyBuild\Master Build.xml:6: taskdef class com.ANT_Tasks.CFileEdit cannot be found
where line 6 is:
<taskdef mame="CFileEdit" classname="com.ANT_Tasks.CFileEdit" />
my root directory is C:\Work\6.70_Extensions\NightlyBuild and i have a folder C:\Work\6.70_Extensions\NightlyBuild\com\ANT_Tasks and i have a CFileEdit.java in that folder. Anybody knows what is wrong?
Edit:
I do not wish to change the structure of my ANT script, therefore what is the next step here?
- i Complied my CFileEdit.java file into CFileEdit.class
- I converted CFileEdit.class into CFileEdit.jar
- i put this CFileEdit.jar into C:\apache-ant-1.8.2\lib where this is my ant directory?
please tell me if i am doing it right or wrong, i am having issues with this currently
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须将
.java
编译为.class
并使用该类作为classpath
来进行taskdef
You must compile the
.java
into a.class
and use the class forclasspath
for thetaskdef