You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by JP Fiset <jp...@fiset.ca> on 2005/09/21 16:30:44 UTC

Fileset and Custom Fileset in Ant 1.7

I am interested in developing a custom fileset. After reading the mail 
archives, it appears that much work is currently happening to allow 
custom file sets in 1.7.  Looking at the trunk implementation, I see 
that this change will affect all fileset-based tasks.

Can anyone comment on the impact of those changes as to the 
compatibility of fileset-based tasks between 1.6 and 1.7?

After reviewing the code (without testing my assumptions), it looks like:
1. Fileset-based tasks written to take advantage of ResourceCollection 
instead of FileSet will not run in Ant prior to 1.7
2. Fileset-based tasks written prior to 1.7 (dependent on FileSet) will 
not be able to support custom file sets, even if running in 1.7

Are my assumptions right?

JP

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Fileset and Custom Fileset in Ant 1.7

Posted by Matt Benson <gu...@yahoo.com>.
--- JP Fiset <jp...@fiset.ca> wrote:
[snip]
> Can anyone comment on the impact of those changes as
> to the 
> compatibility of fileset-based tasks between 1.6 and
> 1.7?
> 
> After reviewing the code (without testing my
> assumptions), it looks like:
> 1. Fileset-based tasks written to take advantage of
> ResourceCollection 
> instead of FileSet will not run in Ant prior to 1.7
> 2. Fileset-based tasks written prior to 1.7
> (dependent on FileSet) will 
> not be able to support custom file sets, even if
> running in 1.7
> 
> Are my assumptions right?
> 
For the most part, yes.  However, depending on your
needs you have some options.  If your "custom fileset"
follows basic fileset semantics you can subclass
fileset and use your implementation freely in version
current and future Ant.  See zipfileset for an example
of a fileset subclass with (very) different behavior
from the parent.  Another option you have is--if your
resources will always be true files--to program to the
path class.  In current Ant versions a path can
contain fileset|dirset|filelist in addition to its own
path attribute and pathelement child elements, but in
Ant >= 1.7 path will accept any ResourceCollection as
long as it consists of filesystem resources only.  In
effect ResourceCollections are transparent to tasks
that make use of paths instead of filesets.

-Matt

> JP
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> dev-help@ant.apache.org
> 
> 



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org