The <fileset> resource collection is for files and not directories.
True, the <delete> task can also remove empty directories once all the
files are deleted, but the <fileset> resource collection really is
just for files.

What you want to do is remove directories. Therefore, you want the
<dirset> resource collection.

    <delete>
        <dirset dir="${DIR}"
           defaultexcludes="false">
           <include name="**/.svn"/>
       </dirset>
   </delete>

You also need to include the defaultexcludes="false" parameter.

By the way, why do you want to remove .svn directories? If this is a
working directory, you'll destroy its usability. If you simply want
the files, you should use "svn export" which does the samething as an
"svn co", but doesn't put in all those .svn directories. That's a lot
quicker than checking out a working directory, and then you don't
waste time removing the .svn directories.

On Wed, May 20, 2009 at 5:34 PM, Paul J. Lucas <[email protected]> wrote:
> I'm trying to use the "deleting subversion directories" example from the
> manual:
>
>        <delete includeemptydirs="true">
>          <fileset dir="${DIR}" includes="**/.svn" defaultexcludes="false"/>
>        </delete>
>
> and it does nothing.  How can this be made to work?  I'm using ant 1.7.0.
>
> - Paul
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>



-- 
David Weintraub
[email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to