ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: nested property references
Date Wed, 02 May 2001 15:23:21 GMT
Rob van Oostrum <> wrote:

> - I agree that it is possible that you can work around not having
> nested property suppport. But I do consider it a workaround. Giving
> me a workaround IMHO does not constitute an argument why the feature
> itself is not needed.

See, we have a different angle on this.  If we don't see the immediate
need for a feature, why should we add it?  There are tons of features
that would be handy in this or that context, but we want to keep Ant
as simple as possible - while making is as useful as possible at the
same time.

Let's say, we simply elect to be not feature complete as we value
simplicity higher than the number of ways to do something.

> - I think that for all practical purposes Ant should either support
> nested property references, or it *shouldn't* support setting them

Pete has already given an example where it makes sense to set
properties with names that contain property references.

> So I think it's just a much more elegant way of setting things
> up. If not for any immediate need, I would like to see it in there
> for the sake of implementing property references properly.

I doubt it would make anything easier for users or implementers, this
is why I asked for a use case.  This shouldn't be a game of "you can
do this differently" - more "my phantasy is too limited, please
explain what you'd use this for".

I see, how this would make the property mechanism in Ant more complete
and consistent, this could be a point for simplicity as well.

> If someone points me in the right direction (where are property refs
> implemented at the moment? ...)  I'll do the coding myself.

It is a mess, spread over Project, ProjectHelper and Property.  The
only thing you'd need to touch would be ProjectHelper.resolveProperties.

> Also: a point about references to non-existing properties. I think
> those should always generate errors

The main reason that they don't generate errors are property files.
As long as we are using java.util.Property.load() to load these files,
we have no guarantee, that we get properties in the same sequence
they've been written into the file.

If the property file contains


we have no guarantee to see property b before we see a - therefore
we'd generate an error when there was none.


View raw message