ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey N. Solofnenko" <a.solofne...@mdl.com>
Subject Re: delete task in Ant
Date Fri, 06 Jan 2006 19:59:15 GMT
By default ANT ignores some files (CVS, backups,...). To make ANT see 
such files add defaultexcludes="false" into <fileset> element (see 
http://ant.apache.org/manual/CoreTypes/fileset.html ). Default excludes 
list: http://ant.apache.org/manual/dirtasks.html#defaultexcludes .

- Alexey.

Ken Gentle wrote:
> The leading "." in the filenames (".#Test.log.1.23") is what is 
> preventing this pattern from matching.  That looks vaguely like an 
> editor backup file or diff/merge tool backup file pattern.
>
> If you're trying to delete files that are named more conventionally 
> (Test.log.1.23), you'll probably need two includes in the fileset, like:
> <delete>
>         <fileset dir=${buildDir}>
>            <include name="*Test.log.*" />
>           <include name=".#Test.log.*" />
>         </fileset>
> </delete>
>
> Don't forget the quotes around the attribute value (name="") - I'm 
> surprised you didn't get an error with the pattern as you have it below.
>
>         Ken
>
>
> At 13:42 2006-01-06, you wrote:
>> I have a file(s) that get created in the build directory that I want to
>> delete, so I used the delete task
>>
>> <delete>
>>         <fileset dir=${buildDir}>
>>            <include name=*Test.log.* />
>>         </fileset>
>> </delete>
>>
>> The files that get created are:
>> .#Test.log.1.23
>> .#Test.log.1.24
>>
>> Why does the ant task not recognize these files? Is there something 
>> wrong
>> with the pattern that I have given it?
>>
>> Thank you for your help
>>
>> Ajay Dharna
>>
>> ---------------------------------------------------------------------------------------------------------

>>
>> This e-mail message may contain privileged and/or confidential 
>> information, and is intended to be received only by persons entitled 
>> to receive such information. If you have received this e-mail in 
>> error, please notify the sender immediately. Please delete it and all 
>> attachments from any servers, hard drives or any other media. Other 
>> use of this e-mail by you is strictly prohibited.
>>
>>
>> All e-mails and attachments sent and received are subject to 
>> monitoring, reading and archival by Monsanto. The recipient of this 
>> e-mail is solely responsible for checking for the presence of 
>> "Viruses" or other "Malware". Monsanto accepts no liability for any 
>> damage caused by any such code transmitted by or accompanying this 
>> e-mail or any attachment.
>> ---------------------------------------------------------------------------------------------------------

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

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


Mime
View raw message