You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Vijay Raghavan <vi...@netscape.com> on 2000/07/21 00:05:52 UTC

Setting properties ***

In the following example do the properties get set eventhough the init target
is never invoked?
Is that the expected behavior? I would have thought that just executing "ant
all" or "ant clean" would mean that none of the properties get set. On the
contrary the properties appear to all be set and in this example the subproject
in /tmp/build/build.xml sees the values of the properties.

<project name="myproject" default="all" basedir=".">
  <target name="init">
    <tstamp/>
    <property name="name1" value="value1"/>
    <property name="name2" value="value2"/>
  </target>

  <target name="all" >
   <ant antfile="/tmp/build/build.xml" dir="."/ target="all">
  </target>

  <target name="clean" >
    <ant antfile="/tmp/build/build.xml" dir="." target="clean"/>
  </target>
</project>


Thanks
Vijay