ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aliaksandr Voitau <>
Subject <path id=..>, <classpath refid=..> using trouble
Date Tue, 13 Sep 2005 14:28:00 GMT

<path id="sample.classpath">
  <pathelement location="${lib}/sample.jar" />

<target name="target-name">
    <taskdef name="sample"
        <classpath refid="sample.classpath" />

While trying to invoke this target from java code i get the following error:

taskdef class my.pkg.Sample cannot be found,

although i set ${lib} from java code using setProperty(...) right before 
executing target "target-name".
However, if i'll just paste <path> content to <classpath>:

||<target name="target-name">
    <taskdef name="sample"
*        <classpath>
        *|*|    <pathelement location="${lib}/sample.jar" />
|*|    </taskdef>

or just put ${lib} to property file everything works fine, or even just 
nest <path> into <target>.

So, <path> seems to resolve nested elements' properties only on the time 
of the first parsing by ProjectHelper's parse(...), but not on executing 
particular target, using that path, when previously undefined properties 
became available. Is it correct behaviour?
Couldn't find any explanation in available documentation.

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

View raw message