On Mon, 7 Mar 2005, Matt Benson <[EMAIL PROTECTED]> wrote: > When defining a file/dirset, if I want to exclude the > basedir itself I have to use includes="*/**" or some > similar trick. I tried specifying a nested <exclude > name="" /> but that didn't work.
Yes, I ran into the same trap when I modified <sync> which made me create and use DirectoryScanner#appendExcludes instead of simply adding another PatternSet to the FileSet in the syncTarget != null case. > After digging into PatternSet's code I see that we discard > zero-length patterns. Does anyone know the historical reason behind > this? It has always been that way <http://cvs.apache.org/viewcvs.cgi/ant/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java?rev=1.1&view=markup> and this code predates my involvement with Ant. I have no idea why Stefano chose to code it that way. Maybe, just maybe this has been for cases like includes="foo bar" (note two spaces) and has been applied to the nested elements by accident. When I coded PatternSet I merely moved the code from MatchingTask to the new class. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]