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 14:39:36 GMT
From: "Erik Hatcher" <jakarta-ant@ehatchersolutions.com>


> ----- Original Message -----
> From: "Stefan Bodewig" <bodewig@apache.org>
> To: <ant-dev@jakarta.apache.org>
> Sent: Wednesday, February 20, 2002 7:10 AM
> Subject: Re: <property file=... problem
>
>
> > On 20 Feb 2002, Stefan Bodewig <bodewig@apache.org> wrote:
> > > On Wed, 20 Feb 2002, Erik Hatcher
> > > <jakarta-ant@ehatchersolutions.com> wrote:
> > >
> > >> I would only enable the prefix option on loading a properties file
> > >> (or resource).  Seem reasonable?
> > >
> > > yes.
> >
> > but with a BuildException if somebody tries to use prefix with name,
> > location or environment.
>
>
>
> But of course!  :)
>
> Well, location and name aren't mutually exclusive.  But I get the idea
(and
> that was my plan anyway, restrict it to only be valid for file/resource).
>
>

Sorry for jumping in late on this.  Erik,
I hope you haven't coded this out already -
would you consider this suggestion?

<LoadProperty file="blah">
    <filterreaderset>
        <filter classname="org.apache.tools.ant.filters.TransformProperty">
            <param name="keyprefix" value="somePrefix"/>
            <param name="keysuffix" value="someSuffix"/>
        </filter>
    </filterreaderset>
</LoadProperty>

Two reasons for this:
1.  <property> is loaded enough already.
2.  using filterreaders will make it more customizable
- tomorrow, somebody would consider suffixing the keys
as what they want instead of prefixing them, etc.  This
way we let the user choose what she wants to do...

Thanks,
Magesh

*************************************************
*  Committee: Individuals who can do nothing    *
*  individually and sit to decide that nothing  *
*  can be done together.                        *
*************************************************



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