Is it possible to have Ant print out the classpath for a particular target? If so, how?

自闭症网瘾萝莉.ら 提交于 2019-11-28 16:56:17
karoberts

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>

Docs for pathconvert.

This is even easier with versions of Ant > 1.6

<echo>${toString:classpath}</echo>

See http://ant.apache.org/manual/using.html#pathshortcut for more information

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!