ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knuplesch, Jürgen <Juergen.Knuple...@icongmbh.de>
Subject AW: AW: Showing current classpath Ant is using in Build executing state
Date Wed, 10 Oct 2007 11:50:46 GMT
Thank you! This is great, because I always was thinking of sth. Like that.
There are so many problems with the classpath...


-- 
Jürgen Knuplesch                    www.icongmbh.de
icon Systemhaus GmbH                Tel. +49 711 806098-275
Sophienstraße 40                    
D-70178 Stuttgart                   Fax. +49 711 806098-299

Geschäftsführer: Uwe Seltmann
HRB Stuttgart 17655
USt-IdNr.: DE 811944121 
-----Ursprüngliche Nachricht-----
Von: Steve Loughran [mailto:stevel@apache.org] 
Gesendet: Montag, 8. Oktober 2007 12:42
An: Ant Users List
Betreff: Re: AW: Showing current classpath Ant is using in Build executing state

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}|   |-- "
	               property="echo.compile.classpath"
	               refid="compile.classpath">
	  </pathconvert>
           <echo message=" 
--------------------------------------------------------"/>
	  <echo message=" Project: ${ant.project.name}"/>
	  <echo message=" Ant file: ${ant.file}"/>
           <echo message=" Compile Class Path= ${line.separator}| 
|-- ${echo.compile.classpath}"/>	
	  <echo message=" 
--------------------------------------------------------"/>


-- 
Steve Loughran                  http://www.1060.org/blogxter/publish/5
Author: Ant in Action           http://antbook.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message