【发布时间】:2011-11-24 04:35:46
【问题描述】:
当我在 ant 配置的 global 条目中没有 kodo jar 时,我的 kodoc jdo 增强策略失败。
在我的 Eclipse 环境中,我可以用 ant 构建代码就好了。但是当我在 ant 之外运行 ant 时,找不到 kodo jar 文件。
build.xml:106: taskdef class kodo.ant.PCEnhancerTask cannot be found
任务位于类路径中的 jar 文件 com.bea.core.kodo_1.0.0.0_4-2-0.jar 中。我用这个技巧把它打印出来了http://blog.andrewbeacock.com/2005/08/pretty-printing-java-classpaths-using.html。
我已尝试重新排序 ant <path id="cp"> 中的项目,但这似乎没有效果。
我不知道如何使构建文件通用。
<target name="enhance">
<available property="propfile" file="../../config/pebig.jdo.properties"/>
<echo>base dir is ${basedir} props is ${propfile}</echo>
<echo message="|-- compile classpath"/>
<echo message="| |"/>
<echo message="| |-- ${echo.path.compile}"/>
<taskdef name="kodoc" classname="kodo.ant.PCEnhancerTask">
<classpath refid="cp"/>
</taskdef>
<kodoc>
<classpath refid="cp"/>
<config propertiesFile="${configProperties}"/>
<fileset dir="${srcdir}">
<include name="**/*.jdo" />
</fileset>
</kodoc>
</target>
【问题讨论】: