ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Glowacki <d...@ssec.wisc.edu>
Subject Re: <delete> without following symlinks
Date Mon, 08 Mar 2004 20:51:50 GMT
On Mar 5, 2004, at 6:15 PM, RADEMAKERS Tanguy wrote:
> Dave Glowacki wrote:
>> I've got a build file which runs a Unix program to set up a build 
>> directory.  Among other tasks, this Unix program creates symbolic 
>> links to several directories of utility programs.
>>
>> One of the first commands the build.xml file contains is <delete 
>> dir="${builddir}">, which attempts to follow the symlinks and delete 
>> everything in the symlinked directories, which is NOT what I want to 
>> have happen.
>>
>> Is there an option for the <delete> task telling it not to follow 
>> symlinks?
>
> you could use a nested <fileset> with a followsymlinks="false" 
> attribute.
>
> see the manual page on FileSet.

Thanks for the suggestions.  So far, I'm up to this:

   <delete includeEmptyDirs="yes">
    <fileset dir="workdir" followsymlinks="no" defaultexcludes="no"/>
   </delete>

which doesn't follow symlinks but also doesn't delete the symlinks 
themselves.

Any ideas?  (I'm using ant 1.6.0, but I didn't see anything related to 
this in the 1.6.1 release notes)


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


Mime
View raw message