ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <>
Subject Re: LoadFile task
Date Fri, 15 Feb 2002 16:43:25 GMT
From: "Steve Loughran" <>

> >
> > <loadfile property="t" srcFile="d:\temp\build4.xml">
> >     <filterreaderset>
> >         <filterrdr
> > classname=""/>
> >         <filterrdr
> > classname=""/>
> >     </filterreaderset>
> > </loadfile>
> >
> slick
> I'd request that there is a filterreader interface that they are all
> of,

The Ant filters have to extend and
implement the interface
which will have the method setParameters(Properties);

> and that that if you spec a short name 'ZapLineCommentsFilterReader'
> then there is no need to give the full path.

ok.  How do you want that done?

> I actually did the first pass of the crlf filter as a StreamReader, but it
> didnt work, there were nulls appearing at the end of the string, one for
> every char stripped. So I went to a string to string postprocessor

I guess you are not setting/using the return value of read(char[]).
It is supposed to provide the number of characters actually
read.  If you go by the array size, that might be a bad idea.

> One issue: how do you pass parameters to the filters. Something like a
> line breaks filter needs to know the char to replace it by; the comment
> filter needs them too. Perhaps a
> <param name value> pair is needed there.

I was debating within myself to decide if it is the responsibility
of the Ant engine to provide such plugs or if it is the
responsibility of the FilterReader to read the configuration
parameters from, say, a properties file.  But, since, you
seem to prefer that Ant provide mechanisms, I will do so.


*  Optimist: A person who while falling from the            *
*  Eiffel tower says in midway "See I am not injured yet."  *

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

View raw message