My problems are related to the Ant tasks filter and copy. Here is a
distilled form of the problem:
File build.properties:
user=smith
home.dir=/home/${user}
PROJ=${home.dir}/project
File build.xml (excerpt):
<target name="mkpar">
<property file="build.properties" />
<echo message="home.dir=${home.dir}" />
<filter filtersfile="build.properties" />
<copy file="par.xml.template" tofile="par.xml" filtering="true" />
</target>
File par.xml.template (excerpt):
<dir>@PROJ@</dir>
Running target mkpar first outputs
home.dir=/home/smith
but the resulting file par.xml contains
<dir>${home.dir}/project</dir>
and not, as I would have expected,
<dir>/home/smith/project</dir>
It is as if the properties would not be substituted properly when
the property file is used as a filter.
Is this a bug in Ant or a feature? Can someone suggest an easy workaround?
Ronald
Stefan Bodewig - 27 Nov 2003 09:01 GMT
> It is as if the properties would not be substituted properly when
> the property file is used as a filter.
>
> Is this a bug in Ant or a feature? Can someone suggest an easy workaround?
It is a known (missing) feature in Ant, see
<http://issues.apache.org/bugzilla/show_bug.cgi?id=8972>
Stefan
Stefan Bodewig - 27 Nov 2003 09:09 GMT
> It is as if the properties would not be substituted properly when
> the property file is used as a filter.
>
> Is this a bug in Ant or a feature? Can someone suggest an easy workaround?
It is a known (missing) feature in Ant, see
<http://issues.apache.org/bugzilla/show_bug.cgi?id=8972>
Stefan