I am sure this question has been asked and answered but.....
Is it possible to echo an refid?
ie.
<path id="classpath">
<pathelement location="${common_lib.dir}/xpp3.jar"/>
<pathelement location="${common_lib.dir}/jibx-run.jar"/>
<pathelement location="${common_lib.dir}/jibx-bind.jar"/>
<pathelement location="${common_lib.dir}/oracle/ojdbc.jar"/>
<pathelement location="${common_lib.dir}/oracle/classes12.jar"/>
<pathelement location="${tomcat.dir}/common/lib/servlet-api.jar"/>
</path>
<echo message="refid classpath"/>
Thanks for the help
john
Hi,
> I am sure this question has been asked and answered but.....
>
[quoted text clipped - 8 lines]
> </path>
> <echo message="refid classpath"/>
yup, there's a 'hack' with refid's / id's (undocumented)
the ant developers say one shouldn't use it, as it could be
altered in the next ant version.
that said, i use it a lot ;-)
just put the line
<echo message="${toString:classpath}"/>
instead of <echo message="refid classpath"/>
and you have it all on one line separated with ';'
with antcontrib or antelope <for> task you may do things like =
<for list="${toString:classpath}" param="pathitem" delimiter=";">
<sequential>
<echo>pathitem == @{pathitem}${line.separator}</echo>
</sequential>
</for>
[1] http://ant-contrib.sourceforge.net/
[2] http://antelope.tigris.org/
bye4now, Gilbert
P.S.:
if you're using ant regularly subscribe the ant user list - recommended
the antelope tasks should have been merged into antcontrib
but that ain't finished, so i use both.
there might also be another (somewhat 'cleaner') way via <pathconvert>
task that ships with ant, just have a look into the ant manual.
coltrane - 14 Jun 2006 21:41 GMT
> Hi,
>
[quoted text clipped - 43 lines]
> there might also be another (somewhat 'cleaner') way via <pathconvert>
> task that ships with ant, just have a look into the ant manual.