On 4 Apr 2002, <[EMAIL PROTECTED]> wrote: > I'm not sure why you can't pass a <dirset> to a <fileset> by > reference.
because the result would be counterintuitive. <dirset id="dirs" dir="." /> is supposed to contain all directories under basedir. <jar> <fileset refid="dirs" /> </jar> will include all files, including the directories will happen by accident. The problem is, that FileSet doesn't really encapsulate files, but only a DirectoryScanner - and it is up to the task to decide whether they want to use the files or directories or even both. If you pass a dirset as a fileset to a task that is not aware of the DirSet class (read, all tasks except pathconvert), they will use getIncludedFiles(). An ugly(? - yes, I think it would be ugly) hack to make dirset work like ones expectation would be to override getDirectoryScanner in DirSet so that it returns a DirectoryScanner that was a wrapper around the DirectoryScanner returned by FileSet and reroutes get*Files to get*Directories and vice versa. That way, tasks would call getIncludedFiles and get the directories instead. Stefan -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
