ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin van den Bemt" <m...@mvdb.com>
Subject RE: Deleting properties
Date Thu, 14 Feb 2002 12:43:47 GMT
An example (don't look at the syntax..)

<target name="start">
  <antcall target="distribute">
    <param name="customer" value="martin"/>
  </antcall>
</target>

<target name="distribute">
  <available property="settings.exists" file="${customer}/settings"/> <!--
should eg unset property -->
  <etc.etc.etc>
  <antcall target="dothis"/>
  <antcall target="dothat"/>
  <antcall target="doso"/>
</target>

<target name="dothis" if="settings.exists">
  <!-- do whatever -->
  <!-- and delete the property eg -->
  <deleteproperty name="settings.exists"/>
</target>

etc,etc..

I know this can be handled differently (which I am currently doing), but for
me this looks a bit cleaner..

Hope this clears up things ;)

Mvgr,
Martin


> -----Original Message-----
> From: Stefan Bodewig [mailto:bodewig@apache.org]
> Sent: Thursday, February 14, 2002 13:17
> To: ant-dev@jakarta.apache.org
> Subject: Re: Deleting properties
>
>
> On Thu, 14 Feb 2002, Martin van den Bemt <mvdb@mvdb.com> wrote:
>
> > I looked at the project.java and it doesn't contain any methods for
> > clearing or deleting properties
>
> This is a side effect of making properties immutable.
>
> If you leave unsetting a property open to the public, changing the
> value of a property is a simple matter of first unsetting and then
> setting with a new value.
>
> What you need to convince the majority of committers that properties
> need to be mutable from time to time is a use case - why do you want
> to unset a property?
>
> Stefan
>
> --
> To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>
>
>


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


Mime
View raw message