我根据Apache doc创建了一个自定义ant任务.
运行蚂蚁,我得到:
BUILD FAILED
/home/russ/blackpearl/fun/build.xml:92: taskdef class com.etretatlogiciels.ant.task.SqlScriptPreprocessor cannot be found using the classloader AntClassLoader[]
Run Code Online (Sandbox Code Playgroud)
在使用之前,我在build.xml中有以下内容
<taskdef name="sqlscriptpreprocessor" classname="com.etretatlogiciels.ant.task.SqlScriptPreprocessor" />
Run Code Online (Sandbox Code Playgroud)
...我已将sqlscriptpreprocessor.jar的副本放入我的本地lib子目录(应该在classpath上),甚至放入/ usr/bin/ant/lib(这是apache-ant-1.8.2).
这应该去哪儿?或者我应该寻找其他什么问题?
非常感谢任何和所有评论.
拉斯
尝试嵌套
<classpath>
<pathelement location="C:\**\**.jar"/>
</classpath>
Run Code Online (Sandbox Code Playgroud)
在taskdef中,例如
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="C:\myfolder\ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
Run Code Online (Sandbox Code Playgroud)
理想情况下它应该从ant/lib中获取,但是指定pathelement会强制它在给定路径中查找.
| 归档时间: |
|
| 查看次数: |
1071 次 |
| 最近记录: |