On Tue, 11 Sep 2001 15:09, Claudio Corsi wrote:
> Hi all,
>
> I was reading the feature request document for ant2. In the section,
> "III. Things that are simple, easy to implement, where we expect the
> committers to agree". It has the following statement:
>
> * make properties fully dynamic, i.e. allow their value to be reassigned
>
> [will need more discussion because of vote by Glenn McAllister and Conor
> MacNeill]
>
> [finally ACCEPTED]
>
> If I understand this correctly. You mean that if I add the following to my
> build.xml file:
>
> <project ... >
>
> <target name="foo" depends="foo_properties,common" />
>
> <target name="foo_properties" >
> <property name="common.property" value="foo_property" />
> </target>
>
> <target name="bar" depends="bar_properties,common" />
>
> <target name="bar_properties" >
> <property name="common.property" value="bar_property" />
> </target>
>
> <target name="common" if="common.property" >
> <echo message="commom.property=${common.property}" />
> </target>
>
> </project>
>
> And I run the command:
>
> ant foo bar
>
> I would get:
>
> common.property=foo_property
> common.property=bar_property
>
> Is this correct or am I dreaming?
sorta. Theres two issues in that. Are properties immutable (ie unable to be
changed) ? and will "configuration" of tasks pick this up? The first issue
(ie making properties mutable rather than immutable) had no clear consensus
IIRC. The second issue is mostly true of current ant *except* in certain rare
occurences (when the same task is executing multiple times - like from a
script but property values have changed). We will just fix this minor and
rare case and thus allow easier manipulation of ant systems from your
favourite scripting language (javascript/python/whatever).
> I know that with ant 1.3 and 1.4 I get the following:
>
> common.property=foo_property
> common.property=foo_property
Yep. Not sure 100% on what Ant2 will do here though.
--
Cheers,
Pete
--------------------------------------------------
The fact that nobody understands you doesn't
mean you're an artist.
--------------------------------------------------