--- Arun Gupta <[EMAIL PROTECTED]> wrote:

> --- Matt Benson <[EMAIL PROTECTED]> wrote:
[SNIP]
> > way, please do not derive from MatchingTask!
> Can you share the reasoning behind this opinion ?

MatchingTask has lots of baggage.  Most tasks that
extend from MatchingTask have to BE filesets and
support nested filesets.  More with the answer to your
next question...

> 
> Lets say I'm a lazy programmer and dont want to
> specify nested elements in my task for only one set
> of
> files that needs to be included. I'd rather provide
> the option of specifying "includes" attribute as
> well.
> How do I do that with Task ?

If you really need to do this, you would be correct to
use MatchingTask.  But be aware that the pattern with
MatchingTasks is that they seem to end up containing
MORE code tasks that simply deal with nested filesets,
for the reason that they tend to deal with both.  The
alternative to that is dealing with a single fileset
only as a MatchingTask is designed to do.  But now you
have crippled your new Task from its inception, and it
will mean more work and code if you change your mind
later.  The amount of code required at the outset is
not going to be remarkably different regardless of the
approach you take.  Finally, with Ant's ability to
adapt arbitrary Java classes as Tasks (implement
public void execute() ), your "task" doesn't have to
derive from Task.  So there's another "cost" incurred
by extending MatchingTask.

HTH,
Matt
> 
> -Arun
> 
> <snip>
> 
> 
> 
>       
>               
> __________________________________ 
> Celebrate Yahoo!'s 10th Birthday! 
> Yahoo! Netrospective: 100 Moments of the Web 
> http://birthday.yahoo.com/netrospective/
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



        
                
__________________________________ 
Celebrate Yahoo!'s 10th Birthday! 
Yahoo! Netrospective: 100 Moments of the Web 
http://birthday.yahoo.com/netrospective/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to