ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <umag...@apache.org>
Subject Re: <property file=... problem
Date Wed, 20 Feb 2002 16:19:03 GMT
From: "Erik Hatcher" <jakarta-ant@ehatchersolutions.com>

> I would only enable the prefix option on loading a properties file (or
> resource).  Seem reasonable?
>
> In the other cases you can control the prefix with 'name' or
'environment'.
>
>     Erik
>
>
> ----- Original Message -----
> From: "Stefan Bodewig" <bodewig@apache.org>
> To: <ant-dev@jakarta.apache.org>
> Sent: Wednesday, February 20, 2002 2:13 AM
> Subject: Re: <property file=... problem
>
>
> > On Tue, 19 Feb 2002, Erik Hatcher <jakarta-ant@ehatchersolutions.com>
> > wrote:
> >
> > > One thing I was thinking of doing is enhancing the <property> task
> > > to take a 'prefix' attribute that would prefix all properties set if
> > > specified.
> >
> > +1
> >
> > But how do you want to deal with
> >
> > <property environment="prefix1" prefix="prefix2" />
> >
> > ??
> >
> > Stefan
> >

-1

Though <property environment=.../> has set
a precursor of letting in a prefix, providing
prefix attribute to <property file=... prefix=.../>
is a very short-sighted implementation and
is not generic, IMHO.

If we introduce the attribute prefix today,
I would want to have the attribute suffix
tomorrow, the ability to replace keys or values
with some other key strings on the fly, day after
tomorrow.  Right now, if a property file
has two identical keys with different values,
only the second key will be loaded.  Not that I would,
but if I want to be able to differentiate
identical keys by attaching a .1, .2, .3 suffix
at runtime, I can't and I would need to morph
the property file into a new property file using
some other tasks (I don't even know if it is
possible, right now)...  Someday, I would
want to load only those properties in a
properties file that contain the key string
"Init" or something like that.

I have already proposed an alternative way to
implement this feature - that of transforming
keys & values present in a property file before
loading them in as Ant properties.

Cheers,
Magesh

****************************************************
*  Atom Bomb: An invention to end all inventions.  *
****************************************************



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