ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Hermann <>
Subject problem with scoping of properties?
Date Wed, 04 Apr 2001 00:34:32 GMT
here are two excerpts from one of my build files:

  <target name="init_bl" if="ant.mode_bl">
    <property name="ant.mode_other"	value="true"/>
    <property name="mode.classpath"	value=""/>
    <property name="builddir"		value="${carbon.home}/bl/classes"/>
    <property name="srcdir"		value="${carbon.home}/bl/src"/>


  <target name="bl" depends="init">
    <javac srcdir="${srcdir}" destdir="$builddir" debug="on"

the first target is supposed to set up some paths based on the 'ant.mode_bl'
property.  perhaps i do not understand the scoping of properties, but the
'srcdir' and 'builddir' properties appear to be undefined in the "bl" target
(as verified by echo) where the compilation is to occur.  also, these
properties are available in some additional targets that are executed
between "init_bl" and "bl".  i have a feeling there's something obvious i'm
overlooking, but for the life of me, i can't figure out what it is.  any
help would be appreciated.



View raw message