You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Michael Klein <Mi...@agilesoft.com> on 2000/08/14 23:39:06 UTC
deleting *~ with 'build clean'
As part of 'build clean', I'm trying to delete emacs '~' files in the source directory with the following task directive:
<delete dir="." includes="**/*~"/>
but it seems like <delete> isn't being invoked at all. The best I can get it is an error message if I give a bad directory, but I can't seem to
actually get it to delete anything using the 'dir=' parameter. Am I doing something wrong?
I've also tried various permutations:
<delete dir="javasrc" includes="*.java~"/>
<delete dir="javasrc/" includes="*.java~"/
<delete dir="javasrc/com/mycompany/mypackage" includes="*.java~"/>
And none of these actually delete anything. Setting 'verbose="true"' doesn't give any extra info.
I'm working on WindowsNT.
-mike
Re: deleting *~ with 'build clean'
Posted by Chris Grindstaff <ch...@appliedreasoning.com>.
Mike,
By default the Ant excludes "**/*~" files. You need to indicate
in your task that you do not want the default behavior. You do that
by adding the "defaultexcludes" attribute.
So you would specify
<delete dir="." includes="**/*~" defaultexcludes="no" />
This is in the Ant User Manual BTW.
HTH,
Chris
Monday, August 14, 2000, 5:39:06 PM, Michael Klein wrote:
MK> As part of 'build clean', I'm trying to delete emacs '~' files in the source directory with the following task directive:
MK> <delete dir="." includes="**/*~"/>
MK> but it seems like <delete> isn't being invoked at all. The best I can get it is an error message if I give a bad directory, but I can't seem to
MK> actually get it to delete anything using the 'dir=' parameter. Am I doing something wrong?
MK> I've also tried various permutations:
MK> <delete dir="javasrc" includes="*.java~"/>
MK> <delete dir="javasrc/" includes="*.java~"/
MK> <delete dir="javasrc/com/mycompany/mypackage" includes="*.java~"/>
MK> And none of these actually delete anything. Setting 'verbose="true"' doesn't give any extra info.
MK> I'm working on WindowsNT.
MK> -mike
--
Chris Grindstaff
chrisg@appliedReasoning.com | www.appliedReasoning.com