ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Rebhan <>
Subject Re: How to echo the classpathref?
Date Wed, 09 Jul 2008 20:21:59 GMT
Daniel Gröndal schrieb:
> Hi!
> I usually use a macro such as:
> <!-- Macro for echoing an entire fileset by reference -->
> <macrodef name="echo-fileset">
> 	<attribute name="filesetref" />
> 	<sequential>
> 		<pathconvert pathsep="${line.separator}" property="@{filesetref}.echopath" refid="@{filesetref}"/>
> 		<echo>   ------- echoing fileset @{filesetref} -------</echo>
> 	    	<echo>${@{filesetref}.echopath}</echo>
> 	</sequential>
> </macrodef>
> And then:
> <target name="print">
> 	<echo-fileset filesetref=""/>
> </target>
> This gives me the opportunity to convert the path separator and such.

if it's only for a simple echoing - similar to those
System.out ... statements, lowlevel debugging, i would use
the ${toString:...} stuff, otherwards if specific delimiter needed
i would use a macrodef/scriptdef with pathconvert as you suggested.

btw. the ant editor of eclipse (using 3.2.2 on Windows) gives a popup 
window with the files included when using ${toString:...] and mouse
over. Same behaviour on similar attributes f.e. <javac classpathref="..."

Edit your antscript, save and the popup get's updated, when
mouse over again.

Would be nice to see how they did it ?
I think they have to use the ant api somehow !?

Are there any official api docs available, has anybody
more details about or do i have to dig myself in
org.eclipse. ... ?

Regards, Gilbert

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message