ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fei Sha <Fei....@prism.uvsq.fr>
Subject Re: Propagation/scope of dynamic computed name property
Date Fri, 19 Jul 2002 15:26:44 GMT


By <antcall> u start a child project, the properties set in the child
project can not propagate to the parent project, thus in the parent
project, ${tools.notrequired} is never set.

the following example will help to understand it:

<project>

      <target name="x1">
         <property name="x1"   value="1"/>
     </target>

<target name="x2">
      <property name="x2"   value="2"/>
</target>

     <target name="y1" depends="x1, x2">
      <echo message="x1=${x1}"/>
      <echo message="x2=${x2}"/>
     </target>

      <target name="y2">
      <antcall target="x1"/>
      <antcall target="x2"/>
      <echo message="x1=${x1}"/>
      <echo message="x2=${x2}"/>
     </target>

</project>

--------------------
$ ant y1
Buildfile: build.xml

x1:

x2:

y1:
      [echo] x1=1
      [echo] x2=2

-----------------------
$ ant y2
Buildfile: build.xml
y2:

x1:

x2:
      [echo] x1=${x1}
      [echo] x2=${x2}





--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message