ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: Deleting properties
Date Thu, 14 Feb 2002 20:18:16 GMT
How is this any better than just doing:

    <property file="${customer}/settings.properties"/>

Or something like that???

I'm not sure I understand what you're getting at with deleting a property
and why you feel its needed?

So no, it doesn't clear things up! :)

Also, <antcall> gets its own set of properties, and does not affect the
calling set of properties, so what you've written wouldn't work even if you
could delete properties.

    Erik


----- Original Message -----
From: "Martin van den Bemt" <mvdb@mvdb.com>
To: "Ant Developers List" <ant-dev@jakarta.apache.org>
Sent: Thursday, February 14, 2002 7:43 AM
Subject: RE: Deleting properties


> 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>
>
>


--
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