ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brett Knights" <br...@knightsofthenet.com>
Subject RE: Foreach task)
Date Wed, 13 Jun 2001 17:03:03 GMT
Forgive me for butting in but I added a for-each type capability to the sql task and it wasn't
much work nor would I see it as that
difficult to maintain.

What would be wrong with:

a) creating an abstract FileSet aware task that task creators could extend if desired (or
create a FileSetHelper class that would
make supporting a fileset really easy (though the use of reflection within Ant seems to make
it already pretty easy))
b) re-write most of the core Ant tasks to use FileSets
c) promote this in the how-to-build-an-Ant-task documentation.

I'd like further to see FileSet itself modified to take a mapper that would filter/transform
the fileset to provide a list of files
on which to perform the parent task. The only requirement for the mapper interface would be
that it takes an array of Files and
returns an array of Files. Other arguments would be optional.

HTH

> -----Original Message-----
> From: Stefan Bodewig [mailto:bodewig@apache.org]
> Sent: Tuesday, June 12, 2001 1:04 AM
> To: ant-user@jakarta.apache.org
> Subject: Re: Foreach task)
>
>
> Peter Donald <donaldp@apache.org> wrote:
>
> > At 09:29 AM 6/12/01 +0200, Stefan Bodewig wrote:
> >>Peter Donald <donaldp@apache.org> wrote:
> >>
> >>> At 09:20 AM 6/12/01 +0200, Stefan Bodewig wrote:
> >>>>Peter Donald <donaldp@apache.org> wrote:
> >>>>
> >>>>> (3) Remove iteration from all tasks and core and implement it in
> >>>>> another layer ;)
> >>>>
> >>>>In another layer that is not a task?
> >>>
> >>> yup ;)
> >>
> >>Care to expand?
> >
> > Okay - but remember you asked for the can of worms to be opened ;)
>
> Hmm, should have asked whether you were talking about
> templates first 8-)
>
> Thanks
>
>         Stefan
>


Mime
View raw message