ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@mind.net
Subject Re: Patternsets, Filesets, and Mapper
Date Wed, 27 Feb 2002 17:06:57 GMT
> > A PatternSet can represent a list of items (say, package names).
> 
> No, a PatternSet represents a a set of file name patterns, this is not
> realted to package names at all.

Ah, perhaps here is the source of my confusion.  The Ant manual states that the FileSet is
a group of files, and that a PatternSet is a group of patterns.  I had thought that a set
of package names could count as a PatternSet.
 
> > A FileSet can not be generated from this unless either the
> > PatternSet or FileSet handle mappers.
> 
> Why not?

Again, this was in reference to a FileSet being generated from a PatternSet of package
names.

> > Since PatternSet does not allow nested PatternSets, you can not use
> > one PatternSet (package names) for the source of two FileSets (.java
> > and .class) unless the FileSet handles mappers.
> 
> <patternset>
>   <include name="org/apache/tools/ant/*" />
> </patternset>
> 
> matches .class and .java files in the package org.apache.tools.ant.
> 
> <patternset>
>   <include name="org/apache/tools/ant/*.java" />
>   <include name="org/apache/tools/ant/*.class" />
> </patternset>
> 
> makes sure you don't match anything that is not a .java or .class
> file.

Right, I see. What I was trying to do was more along the lines of:
<patternset>
  <include name="org.apache.tools.ant.myTask"/>
  <include name="org.apache.tools.ant.util.mySupportingUtil"/>
</patternset>
 
> > By providing mapper capability to PatternSet and FileSet, all tasks
> > immediately have the capability of taking this sort of input.
> 
> I'm not sure I understand which sort of input you are talking about.

Being able to use a list of dotted-package names for the source list to jar, javadoc,
etc...

> > and PatternSets and FileSets are not very interchangeable.
> 
> Of course they aren't - they are completely different concepts.
> 
> Stefan

Perhaps one of the reasons this was so difficult to figure out was that the mapper
documentation shows examples, but not in context... I spent a few hours yesterday trying
to figure out what I could pass a mapper into.

So, what would be the "correct" way of providing a list of package names, then converting
that list into either *.java or *.class?  If the PatternSet is only supposed to handle
actual filenames, what structure do we have to hold a list of package names?

Thanks for all the input everyone,
Malachi


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message