ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: AW: Showing current classpath Ant is using in Build executing state
Date Mon, 08 Oct 2007 10:41:31 GMT
Knuplesch wrote:
> Hello,
> Depending on the task you use, you can define a lot of classpaths.
> I usually use the classpath or classpathref attribute to set the classpath e.g. for the
javac task.
> The question is: For which task you need the classpath and how do you set the classpath??
> This is how i trace the classpath, if it is stored in a refid:
>    <property name="ausgabejunit" refid="junit.classpath" />
>     <echo>Klassenpfad in junit: classpath=${ausgabejunit}</echo>

Actually, you can skip the conversion by calling toString on the 
classpath (since ant1.6)

<echo>Klassenpfad in junit: classpath=${toString:junit.classpath}</echo>

We use <pathconvert> to split our classpath up with newlines before printing

	    <!-- to get the classpath in a printable form -->
	  <pathconvert pathsep="${line.separator}|   |-- "
           <echo message=" 
	  <echo message=" Project: ${}"/>
	  <echo message=" Ant file: ${ant.file}"/>
           <echo message=" Compile Class Path= ${line.separator}| 
|-- ${echo.compile.classpath}"/>	
	  <echo message=" 

Steve Loughran        
Author: Ant in Action 

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

View raw message