ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Patternsets, Filesets, and Mapper
Date Thu, 28 Feb 2002 03:49:37 GMT
> --- wrote:
> I don't think dot-notation would make sense for <fileset>, since <fileset>
> is used to say "find all the existing files that match this selection
> criteria" -- and packages aren't files.

No, I agree there. The methods in the FileSet seem to mostly call methods in the default
PatternSet... So, by putting createMapper in FileSet that calls default PatternSet's
createMapper, it allows you to pass in a dot-notation PatternSet with a SourceNameMapper
or ClassNameMapper (the two mappers I added) to create .java or .class files from the
dot-notation.  So, the FileSet, in essence, contains a set of .java or .class files.

> > By putting the mapper into the PatternSet
> You might have a case for making <patternset> more generic, since, if you
> take the name literally, it could be legitimate to see it as a place to
> hold any kind of pattern, for any purpose. But I'm confused about what you

That is what I had understood from the docs, and thus the reason for all of these

> mean by "putting the mapper into the PatternSet" -- you don't mean
> something like:
>   <patternset id="foo">
>     <include name="**/*.java"/>
>     <mapper type="glob" from="*.java" to="*.class"/>
>   </patternset>
> right? -- since that would seem pretty silly (instead of just saying
> <include name="**/*.class"/>).

No, my patternset was like:
<patternset id="packages">
  <include name="com.mycompany.util.class1"/>
  <include name=""/>
  <!-- about 40 more package names -->

and you COULD put <mapper type="source".../> in there, but it was more so that the
FileSet.createMapper could call defaultPatternSet.createMapper (mentioned above)...

Thanks for your help...  I don't mind submitting the "correct" patch once we figure out
how it should work  -- but we still have to figure that part out...


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message