ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 49492] The fileset resource collection doesn't handle file/directory names with spaces
Date Thu, 17 Feb 2011 15:47:30 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=49492

--- Comment #8 from Matt Benson <mbenson@apache.org> 2011-02-17 10:47:25 EST ---
(In reply to comment #5)
> I am having a similar issue with <FILELIST> breaking apart filenames with
> spaces in the "files" string.  In addition to breaking apart the string, I am
> relying on <FILELIST> to resolve relative pathnames, so I'm not sure that the
> <RESOURCELIST> workaround will work for me.

Firstly, you can use any resource inside resourcelist.  Now, I assume that what
you are trying to pass to filelist@files is a property, else you'd just be
using nested <file> elements, right?  So you have a <propertyresource>.  I
assume you must be using commas for your token, so you could use a <tokens>
resourcecollection to break up your propertyresource.  To add leading paths,
you could add another level of indirection into the <tokens>:  a <concat>
task/resourcecollection using a filterchain configured with a prefixlines
filter.  Actually once you're using <concat> you can probably skip the <tokens>
collection altogether and use it to tokenize your comma-delimited stuff *and*
prefix the resulting lines, passing the <concat> resource directly to
<resourcelist>.  I am thus 99% confident that a solution *can* be made to work
using <resourcelist>.  I don't have any major antipathy towards making
separators configurable in <filelist>; however it would introduce an
inconsistency between filelist and fileset/files/dirset that is IMO
unnecessary.  These other types are somewhat different than filelist due to the
fact that they all deal with directory scanning and therefore support
includesfile/excludesfile as a means of specifying patterns with embedded
spaces.  Of course, knowing that <filelist> supports the nested <file> element
for this purpose (as documented in the manual), an alternative could be to use
antcontrib:for to iterate over your comma-delimited property, then use the
<augment> task to add the nested <file> elements one at a time.

Please follow up on user@ant.apache.org if you need more information about any
of the approaches I've outlined here.

Matt

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message