You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Rich Steele <rs...@etracksolutions.com> on 2002/06/11 16:49:28 UTC

Getting Ant properties into FilterSet

I'd like an easy way to get all of my ant properties into a filter set.
In other words, instead of defining a filterset like this:

<filterset>
   <filter token="foo" value="${foo}"/>
   <filter token="bar" value="${bar}"/>
</filterset>

I'd like to define it as:

<filterset>
   <filtersproperties/>
</filterset>

I've worked around this somewhat by using the new <echoproperties> task,
like:

<echoproperties destfile="${build.dir}/build.properties"/>
<filterset>
   <filtersfile file="${build.dir}/build.properties"/>
</filterset>

but I'd like to do this without resorting to saving the properties to a
file.

Along similar lines, is it possible to define a filterset once and refer
to it by ID?  For example,

<filterset id="properties.filter.id">
   <filtersproperties/>
</filterset>

.
.
.

<copy filtersetid="properties.filter.id" ...>

The reason this would be useful is because I copy several files during
my build/deploy process, and keeping each filterset up to date with the
various properties is becoming tedious.

Rich



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>