Michael McCallum <gholam@xtra.co.nz> wrote:
> On Wednesday 02 May 2001 08:31, you wrote:
>> Michael McCallum <gholam@xtra.co.nz> wrote:
>> > The sql patch does not do anything execpt add a call to
>> > filterset.replaceTokens( sql )
>>
>> Why use filters instead of property substitution for this?
>
> Because the substitution occurs for all sql statements even those
> coming from file.
Why couldn't you do this with properties? I think we are consistently
using property expansions except when copying files and I'd like to
keep it this way.
When you invoke filterset.replaceTokens(sql), how is this different
from ProjectHelper.replaceProperties(project, sql, project.getProperties())
- from the point of functionality, you are replacing one pattern with another.
I guess, I'm missing something obvious.
> I do not believe that property replacement should be carried out on
> file loaded sql.
Why not? To me filters are restricted to the filtered copying of
files - and I'm even thinking about removing them for this purpose as
well, like
<copy ...>
<filterset>
<property name="prop1" />
<property name="prop2" />
</filterset>
</copy>
where each occurrence of @prop1@ would be replaced with the expanded
${prop1}. This is just a random thought.
Here we are getting at the point where my main concern with your
filterset patch originates from. We have decided to give people more
control over the filtering that happens when copying files - we've not
decided how we would do that yet.
If we add filtersets in Ant 1.4 but decide to drop filters completely,
change the concept in some other way, we are going to confuse users
more than we need to do. I'd simply prefer to see how we are going to
change it in Ant2 - and I'd like to take your filterset concept as one
proposal to achieve it.
>> > I could split it all up into patches for Project, copy,
>> > DefaultCompilerAdapter, Filter, SQLExec etc if you would like.
I've just browsed over the original patch to find out what you've been
doing with <javac> here (as filtering has gone away with the copying
of support files in Ant 1.2).
You want to apply filtering to the output from javac? Why? I'd
prefer to see what an error message really looks like 8-)
Stefan