是否有可能有蚂蚁打印出来的类路径中一个特定的目标?如果是这样,怎么样? [英] Is it possible to have Ant print out the classpath for a particular target? If so, how?
问题描述
我试图让一个目标来构建具有&LT相当长的名单; pathelement位置=$ {XXX}/>
和<路径REFID =foo.class.path/>
在&LT元素;路径ID =bar.class.path>
元素(build.xml文件)。我不断收到包com.somecompany.somepackage不存在的错误,而且我有一个很难追逐这些包,并确保我从我们的代码库同步它们。
I'm trying to get a target to build that has quite a long list of <pathelement location="${xxx}"/>
and <path refid="foo.class.path"/>
elements in its <path id="bar.class.path">
element (in the build.xml file). I keep getting "package com.somecompany.somepackage does not exist" errors, and I'm having a hard time chasing down these packages and making sure I've synced them from our repository.
我是新来这个团队,所以我不熟悉的身材,但我会preFER算出这个自己,如果可能的(所以我不打扰对方很忙团队成员)。我有蚂蚁的经验非常有限。
I'm new to this team so I'm unfamiliar with the build, but I would prefer to figure this out myself if possible (so I don't bother the other very busy team members). I have very limited experience with Ant.
我认为它会救我相当多的时间,如果我能有蚂蚁打印输出的类路径的目标,我试图建立。
I think it would save me quite a bit of time if I could have Ant print out the classpath for the target I'm trying to build.
推荐答案
使用 pathconvert
任务的路径转换为一个属性。
Use the pathconvert
task to convert a path to a property
<path id="classpath">
....
</path>
<pathconvert property="classpathProp" refid="classpath"/>
<echo>Classpath is ${classpathProp}</echo>
这篇关于是否有可能有蚂蚁打印出来的类路径中一个特定的目标?如果是这样,怎么样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!