Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
at my wits end with delete

at my wits end with delete

2007-02-09       - By Tracy Jones
Reply:     1     2     3     4     5     6     7     8     9  



I just cannot get this right



I have set up my fileset to exclude a list of directories and delete
everything else



fileset: Setup scanner in dir /opt/stratalight/packages with patternSet{
includes: [*/**] excludes: [OS-4000-1.6(B18)Beta/**
OTS-SC-1.6(B18)Beta/** OTS-4010-1.6(B17)Beta/** OTS-4040-1.6(B17)Beta/**
OTS-4400-1.6(B17)Beta/** OTS-4540-1.6(B17)Beta/**
OTS-4520-1.6(B17)Beta/** OTS-Common-1.6(B18)Beta/**
OTS-4011-1.6(B17)Beta/**] }

  [delete] Deleting
/opt/stratalight/packages/OS-4000-1.6(B18)Beta/OTS-4010/clientFpga4010.s
lim



But (as you can see) the first thing it deletes is something under one
of my excluded directories.  Can someone please point out what I am
doing wrong???  Thanks



Tracy



(ant 1.7.0)



Here's the snippet of code



${directories} is OS-4000-1.6(B18)Beta/** OTS-SC-1.6(B18)Beta/**
OTS-4010-1.6(B17)Beta/** OTS-4040-1.6(B17)Beta/**
OTS-4400-1.6(B17)Beta/** OTS-4540-1.6(B17)Beta/**
OTS-4520-1.6(B17)Beta/** OTS-Common-1.6(B18)Beta/**
OTS-4011-1.6(B17)Beta/**



<delete includeemptydirs="true" >^M

                       <fileset dir="${installation.dir}"
casesensitive="yes">

               <exclude name="${directories}"/>

               <include name="*/**"/>

           </fileset>

</delete>^M






©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.