You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Tracy Jones <tr...@stratalight.com> on 2007/02/09 23:45:17 UTC
at my wits end with delete
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
Re: at my wits end with delete
Posted by Dominique Devienne <dd...@gmail.com>.
> ${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/**
> ...
> <delete includeemptydirs="true" >
> <fileset dir="${installation.dir}" casesensitive="yes">
> <exclude name="${directories}"/>
> <include name="*/**"/>
> </fileset>
> </delete>
It's a classic error Tracy.
<exclude name=""> takes a *single* pattern, not a list of patterns.
It's the excludes attribute of fileset that takes a list of patterns,
and then I've always used a comma-separated list (although space
separated may work...). --DD
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: at my wits end with delete
Posted by "Anderson, Rob (Global Trade)" <Ro...@nike.com>.
The excludes should be comma seperated. It's difficult to tell from your
post whether or not that is the case. Please send the part of your
build.xml that defines the excludes.
-Rob Anderson
> -----Original Message-----
> From: Tracy Jones [mailto:tracy@stratalight.com]
> Sent: Friday, February 09, 2007 2:45 PM
> To: Ant Users List
> Subject: at my wits end with delete
>
>
>
> 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/client
> Fpga4010.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
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org