当我在ant配置的全局条目中没有kodoc时,我的kodoc增强策略失败了。
在eclipse环境中,我可以很好地使用ant构建代码。但是当我把蚂蚁从蚂蚁外面赶出去时,就找不到考多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>发布于 2011-11-16 00:04:59
这个语法有用吗?还是你已经在使用这个语法了?
<taskdef resource="propertiesfile name">
<classpath>
<fileset file="/path/to/jars"/>
</classpath>
</taskdef>请张贴一个代码样本。
https://stackoverflow.com/questions/8144397
复制相似问题