ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject <property file="..." prefix="..."/> what to expand?
Date Thu, 17 Jun 2010 15:10:29 GMT

when we have a file file like



    <property name="x" value="y"/>
    <property file=""/>

the ${y} will end up being "y", which is fine - properties are

If you use

    <property file="" prefix="foo"/>

instead, Ant 1.8.0 will set ${foo.y} to "y" as well as it doesn't apply
the prefix when expanding ${x}.  Ant 1.8.1 uses the prefix when
expanding ${x} inside the file and thus expands ${foo.y} to "x" which
makes sense in that it makes the property file self-contained.

There is an open bug report against 1.8.1 that wants the old behavior
back <>.

Locally I have a version of trunk that reinstates 1.8.0's behavior, but
that same version breaks the AntUnit tests for <loadproperties> with a
prefix attribute because the 1.8.1 way is explicitly expected here.

We don't have any documentation either way.

I see the following choices:

  (1) embrace <loadproperties prefix="..."/> way for <property file> as
      well and document it as a breaking change that already occured in

  (2) make <loadproperties> prefix useless, remove it again, make
      <loadproperties> match <property file> of Ant 1.8.0 and earlier.

  (3) allow different behavior of the tasks and document it.

I can't say I'd like either of the three choices too much, maybe anybody
sees a different option.  (1) looks most attractive to me but there
doesn't seem to be a workaround if you want the old behavior back.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message