ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pedro Salazar <pedro-b-sala...@ptinovacao.pt>
Subject RE: property set in sub-task not defined
Date Mon, 17 Mar 2003 21:23:57 GMT
Hi Dominique,

your sample does not work! 
The output if you "echo" the "${lib.classpath}" is "${lib.classpath}",
and not is value...

Should I test it OK?

thanks,
Pedro Salazar.

On Mon, 2003-03-17 at 20:46, Dominique Devienne wrote:
> Using pure Ant:
> 
> <target name="init" depends="-lib.dir.exists?, -set.lib.classpath">
>   <property name="lib.classpath" value="" />
>   ...
> </target>
> 
> <target name="-lib.dir.exists?">
>    <available file="${lib.dir}" type="dir"
>               property="lib.dir.exists" />
> </target>
> 
> <target name="-set.lib.classpath" if="lib.dir.exists" >
>   <path id="lib.classpath">
>     <fileset dir="${lib.dir}" includes="**/*.jar" />
>   </path>
>   <property name="lib.classpath" refid="lib.classpath" />
> </target>
> 
> Using Ant-contrib would be nicer of course. Maybe one day it will make it to
> Ant: some committer seem to prefer spaghetti Ant as above than an <if>, but
> maybe just maybe the wind is turning from recent posts on ant-dev... --DD
> 

-- 
<id name="pedro salazar"> 
<email>pedro-b-salazar@ptinovacao.pt</email>
<pgp-key-id>0E129E31D803BC61</pgp-key-id>
</id>


Mime
View raw message