ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCallum" <>
Subject Re: Filter and Filtersets (was SQLExec and Properties)
Date Thu, 03 May 2001 19:54:56 GMT
Should have read all my mail before I started responding. :)

On 3 May 2001, at 15:47, Stefan Bodewig wrote:

> Jose Alberto Fernandez <> wrote:
> > Here we are starting with the premise that you have SQL files for a
> > particular 3rd party tool, that you want to incorporate in your
> > build.  Some of them may be yours to modify, but others may have
> > been provided to you by others.
> And you need to replace @foo@ or &&foo with something meaningful
> inside Ant as the scripting tool of your RDBMS would do, right?  OK.
> The filter mechanism wouldn't work for &&foo anyway, would it?
With my changes it does. 

> OK, I see that <sql> could and should be improved to support something
> like this, but don't think we should couple it to filters at all.
The way I see its the filters are a set of name/value pairs (just likeproperties as you pointed
that you use for substitution.

When doing a copy you use a the name values pairs to replace tokens.
When you read the sql file you use the name value pairs to replace tokens I dont see a 

> I agree that simple ${} expansion is not enough, thank you and Michael
> for explaining it to me.
You are welcome. :)

If the was a way to group properties into sets. Then it would be easy to adapt the filterset

interface to use property sets. So then there would be only one mechanism for producing the

name/value pairs just several for using them.

I might give a little background on the problem I solved to help clarify.

I have a build system that compiles all our projects and packages them up into tar gz's.
This includes jars, html, css, docs, and deployment tools.
It also creates from template the install scripts to install the project once its on site
(ie copied to 
the appropriate server.)

Two of these product are themselves templates for creating instances of applications.

There is heaps of configuration stuff that gets installed and this all needs filtering but
separate sets of filters. Mostly defined in separate properties files.

So I have a script or two full of copy's and sql commands with the filtering.
It used to be achieved with perl scripts but it was simpler for me to show people how to use
scripts than how to read/write perl :)

I think I rambling now so am going to do some work( I can ramble in my work instead of on
list :). 



View raw message