ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vijay Raghavan <vi...@netscape.com>
Subject Re: Setting properties ***
Date Thu, 20 Jul 2000 22:36:55 GMT
mmm...thanks for the info.
Looks like ANT could use some notion of scoping of properties.
Vijay


glennm@ca.ibm.com wrote:

> The problem is that the file is parsed and evaluated _before_ execution.
> The upshot is that property values are _always_ set, no matter where they
> are located.
>
> This is a known issue/concern, and has been around since Ant was first
> created.  There was a discussion a few months ago about changing the model,
> namely nothing is evaluated/resolved untill just before execution time, but
> there hasn't been much activity on this since.
>
> Glenn McAllister
> TID - Software Developer - VisualAge for Java
> IBM Toronto Lab, (416) 448-3805
> "An approximate answer to the right question is better than the
> right answer to the wrong question." - John W. Tukey
>
> Please respond to ant-dev@jakarta.apache.org
>
> To:        ant-dev@jakarta.apache.org
> cc:
> Subject:        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
>
> [IMAGE]
>
> (See attached file: C.gif)
> (See attached file: smime.p7s)
>
>   ------------------------------------------------------------------------
>                Name: C.gif
>    C.gif       Type: GIF Image (image/gif)
>            Encoding: base64
>         Description: Compuserve GIF
>
>                 Name: smime.p7s
>    smime.p7s    Type: PKCS7 Signature (application/x-pkcs7-signature)
>             Encoding: base64

Mime
View raw message