ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: [RFC] permissions filters on file/patternset
Date Fri, 02 Mar 2001 08:19:09 GMT
Tim Vernum <> wrote:

> Once I get some of the "free-time" thing people keep talking about,
> I was going to put forward a proposal for how I thought filesets
> should work in ant2.

Oh yes, I sure would love a discussion on this topic - and part of it
could even apply to Ant1 if there should be a next Ant1 release, which
is not that unlikely IMHO.

I'm throwing in some ideas that float in my mind, based on the
experience with the fileset variations introduced in Ant 1.3.

Right now I've seen three types of modifications being made to
filesets - and you add a fourth one.

(1) We are not really talking about a set of files, but about a set of
things that can be treated like files in certain contexts. Things like
ZIP-entries (see <zipfileset> in <zip>).

I don't see any reason why we shouldn't make this type of
functionality available to other tasks as well. Other sources of file
like stuff could be TAR-entries or FTP-URLs

This could simply be something like

<fileset type="file" src="directory" ...>
<fileset type="zip" src="" ...>

(2) Do something with the names of the files - fullpath and prefix
attributes of <zipfileset>.

Pete has suggested to allow a mapper to be tied to a fileset in
general, something like

<fileset ...>
  <mapper type="glob" from="*" to="prefix/*" />

could replace the prefix attribute.

(3) Add attributes to filesets to define an action. See <tarfileset>
in <tar> where you use a fileset to assign permission bits and
ownership information to entries in the tar file. Maybe this would
have better been

<tar ...>
  <attributes mode="755" username="ant" group="ant">
    <fileset dir="." includes="*.sh" />

which wouldn't need to augment the fileset for this purpose at all.

(4) Filter based on criteria other than pattern matching.

I think Pete's and your approach is the right one, i.e. <itemfilter>
instead of <include>.


View raw message