ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig Cottingham <>
Subject RE: Consolidated delete task (Re: make clean equivalent)
Date Thu, 25 May 2000 15:07:17 GMT
> Arnout has started a thread about consolidating tasks some days
> ago. One of his proposals (and I'm all for it) was to merge delete and
> deltree into a single delete task.

Makes sense to me, too. One reason for keeping separate tasks might be to
minimize unwanted damage -- what someone has called "the principle of least

> Do we keep different attributes for deleting files and dirs, i.e.
> <delete file="name" /> with no includes or excludes allowed and
> <delete dir="name" /> with all the MatchingTask stuff in place? I
> think we should do so to avoid accidents.

Again, makes sense.

> Should we set defaultexcludes to false by default when deleting a
> directory tree - my opinion is yes.


> Do we need a recurse attribute (don't think so, if you specify a dir,
> you obviously want to delete it)?

I think we might. The delete task (at least the "official" one -- I haven't
tried building from the latest sources) doesn't accept wildcards in the file
attribute (at least not on NT), so the only way to delete all Java class
files in a single directory but not its subdirectories would be

    <delete dir="some/dir" recurse="false" includes="*.class" />

for reasonable values of "only", of course. :-) IMO setting recurse to true
by default would be appropriate.

> Do we need a purge attribute to delete empty dirs - I'm not decided on
> this?

I think so, though it could be set to true by default.

Craig S. Cottingham
PGP key available from:
PGP fingerprint=6AA8 2E28 2404 8A95 B8FC 7EFC 136F 0CEF A2FF BE41

> -----Original Message-----
> From: Stefan Bodewig []
> Sent: Thursday, May 25, 2000 9:53 AM
> To:
> Subject: Consolidated delete task (Re: make clean equivalent)
> [ relevant passages quoted above ]

View raw message