ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RADEMAKERS Tanguy <tanguy.rademak...@swift.com>
Subject Re: <classpath> - what is it?
Date Mon, 05 Jan 2004 12:59:54 GMT
DevKon,

1) if your example is the one from "using ant" then it's just a snippet 
and there isn't enough context to see what ${classpath} refers to. 
Basically, some variable defined elsewhere is the correct (but not very 
helpful) answer - but ${classpath} itself has no magic value.

2) <echo>${classpath}</echo> prints "${classpath}" if ${classpath} is 
undefined, but prints the value of ${classpath} if it is defined:

<project name="mytest" basedir="." default="demo">

    <property name="definedvariable" value="foobar"/>

    <target name="demo">
        <echo>${definedvariable}</echo>
        <echo>${undefinedvariable}</echo>
    </target>

</project>


H:\>ant
Buildfile: build.xml

demo:
     [echo] foobar
     [echo] ${undefinedvariable}

BUILD SUCCESSFUL
Total time: 0 seconds

/t

DevKon wrote:

>I have problem understanding <classpath> 
>
>>>From the manual:
>
>////
>   <classpath>
>      <pathelement path="${classpath}"/>
>    </classpath>
>///
>
>What is ${classpath} referring to? Also, how do I get to print variables or properties
<echo>${classpath}/<echo> prints "${classpath}", how do I get the actual value?
>
>TIA
>
>
>
>
>
>
>
>  
>

Mime
View raw message