ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: MatchingTask breaks with **/*~ pattern
Date Wed, 21 Feb 2001 06:05:12 GMT
At 05:16  21/2/01 -0000, Cathal McGinley wrote:
>I've been using Ant for a while, but I only recently upgraded to version 1.2
>and some of the new stuff confuses me. An old custom MatchingTask now
>breaks, apparently because of the use of FileSets. I am trying to implement
>a simple "clean" task, like make clean, and I thought I'd found a useful
>example in the Ant 1.2 users guide which made my Clean task obsolete. My
>build.xml now looks as follows:
>
><project name="test" default="clean" basedir="/home/time">
><target name="clean">
>    <delete verbose="true">
>        <fileset dir="${basedir}" includes="**/*~" />
>    </delete>
></target>
></project>
>

You may want to try something like

    <delete>
      <fileset dir="." includes="**/*~" defaultexcludes="no"/>
    </delete>


which works fine for me.

>However, the task seems to get caught in an infinite loop and the JVM runs
>out of memory after about 4 minutes. Curiously, if I substitute
>includes="*/*~" the task works fine (but only deletes files in the basedir
>directory). I think, from messing about with my custom task, that the
>problem lies somewhere around the getDirectoryScanner method of FileSet. On
>the other hand, no-one else seems to be having this problem, so it's
>probably just a stupid mistake on my part.

I suspect it is an interaction bug between includes attribute and
defaultexcludes - feel free to try and track the bug down or place it in
our bugzilla ;)

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Mime
View raw message