You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Eric Dalquist <er...@doit.wisc.edu> on 2007/09/17 17:09:31 UTC
fileset exclude with full path
I have a full path to a directory that I want to create a fileset of and
a full path to a sub-directory that I want to exclude.
I've tried the following and some variations on it:
<fileset id="projectFiles" dir="/a/b/c/" excludes="/a/b/c/d/**" />
No matter what I try I can't seem to get the excludes path to be honored.
I unfortunately do not have the ability to change the sub-directory path
to a relative path instead of a full path, it is being populated from
another task that I do not have control over.
Thank you,
-Eric
RE: fileset exclude with full path
Posted by George Czernuszka <ge...@nscgroup.co.uk>.
> From: Eric Dalquist [mailto:eric.dalquist@doit.wisc.edu]
> Sent: 17 September 2007 16:10
>
> I have a full path to a directory that I want to create a
> fileset of and a full path to a sub-directory that I want to exclude.
>
> I've tried the following and some variations on it:
> <fileset id="projectFiles" dir="/a/b/c/" excludes="/a/b/c/d/**" />
>
> No matter what I try I can't seem to get the excludes path to
> be honored.
>
> I unfortunately do not have the ability to change the
> sub-directory path to a relative path instead of a full path,
> it is being populated from another task that I do not have
> control over.
>
> Thank you,
> -Eric
Could you try the <PropertyRegex> task in ant-contrib to construct a
relative path?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: fileset exclude with full path
Posted by Eric Dalquist <er...@doit.wisc.edu>.
I figured that was the requirement ... unfortunately I have no control
over the format of either path. All I get is two properties, each is an
absolute path, and I need to make a fileset using one as the dir and
excluding the other.
My other thought was to look into trimming off the first bit of the
exclude path though I'm not sure how I would do that either. AntContrib
has the propertyregex task but that could get tricky with different path
separators on different OSs. Anyone know of a 'substring' type task?
-Eric
Dominique Devienne wrote:
> On 9/17/07, Eric Dalquist <er...@doit.wisc.edu> wrote:
>
>> <fileset id="projectFiles"
>> dir="/a/b/c/"
>>
>
> Not recommended indeed, but if you really can't change that
>
>
>> excludes="/a/b/c/d/**" />
>>
>
> This is wrong. Needs to be relative to dir attribute above. So should
> be d/** only.
>
> --DD
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
Re: fileset exclude with full path
Posted by Dominique Devienne <dd...@gmail.com>.
On 9/17/07, Eric Dalquist <er...@doit.wisc.edu> wrote:
> <fileset id="projectFiles"
> dir="/a/b/c/"
Not recommended indeed, but if you really can't change that
> excludes="/a/b/c/d/**" />
This is wrong. Needs to be relative to dir attribute above. So should
be d/** only.
--DD
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org