You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Hensley, Richard" <Ri...@McKesson.com> on 2002/08/22 19:33:41 UTC
Deriving from the MatchingTask
I'm creating a custom task that needs to look at a set of files. I'm
deriving the task from MatchingTask, and I think that means that the
task is bascially a FileSet, meaning that it supports the attributes and
elements that are documented in the FileSet portion of the ant
documentation. I'm trying to get a clear understanding of what I get for
"free" when deriving from the MatchingTask.
Have I made a valid assumption?
Richard Hensley
Re: Deriving from the MatchingTask
Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
You get all that for free just as you've stated.
The only thing you need to provide is where to get the base directory
for the implicit fileset. Have a look at any of the many tasks in Ant's
codebase that extends MatchingTask for examples.
The warning I'd give is that if you decide you want to support multiple
filesets that its best not to extend MatchingTask as that makes things
to kludgey and hacked, or so it feels to me. For single-fileset tasks
its a good thing though.
Erik
Hensley, Richard wrote:
> I'm creating a custom task that needs to look at a set of files. I'm
> deriving the task from MatchingTask, and I think that means that the
> task is bascially a FileSet, meaning that it supports the attributes and
> elements that are documented in the FileSet portion of the ant
> documentation. I'm trying to get a clear understanding of what I get for
> "free" when deriving from the MatchingTask.
>
> Have I made a valid assumption?
>
> Richard Hensley
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>