You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Patrick Martin <pa...@yahoo.com> on 2004/07/19 15:02:44 UTC

FileSet and Selector

Hi,

I am not sure, but there seem to be a problem in the
documentation 
concerning Filesets. In the FileSet page, it says
that:

Selectors are available as nested elements.within the
FileSet. If any of 
the selectors within the FileSet do not select the
file, the file is not 
considered part of the FileSet. This makes FileSets
equivalent to an 
<and> selector container.

This surprises me as it would mean that the following
<fileset dir="mydir">
   <include name="**/*.java"/>
   <include name="**/*.class"/>
</fileset>
does not match any file.

My question behind this is: what selector container is
equivalent to a 
fileset?

Patrick


	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: FileSet and Selector

Posted by Stefan Bodewig <bo...@apache.org>.
On Mon, 19 Jul 2004, Patrick Martin <pa...@yahoo.com> wrote:

> Selectors are available as nested elements.within the FileSet. If
> any of the selectors within the FileSet do not select the file, the
> file is not considered part of the FileSet. This makes FileSets
> equivalent to an <and> selector container.
> 
> This surprises me as it would mean that the following
> <fileset dir="mydir">
>    <include name="**/*.java"/>
>    <include name="**/*.class"/>
> </fileset>
> does not match any file.

<include> is not a selector.  It is a nested element of the (older)
implicit <patternset> formed by <fileset>

> My question behind this is: what selector container is equivalent to
> a fileset?

<and>.  And it also is a <patternset>.  If you want to, you can view
the patternset as an <or>-like sepector of its own, although the
result of combining <include> and <exclude> doesn't match either <and>
nor <or>.

Stefan

-- 
http://stefanbodewig.blogger.de/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org