You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by DevKon <de...@rogers.com> on 2003/12/31 16:21:54 UTC
- what is it?
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
Re: - what is it?
Posted by RADEMAKERS Tanguy <ta...@swift.com>.
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
>
>
>
>
>
>
>
>
>