ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Combining PatternSets with Path elements
Date Thu, 09 Nov 2000 09:17:59 GMT
Matt Conway <> wrote:

> Our source tree has a single root, and we break it up into
> components based on a list of package names specified in the .mk
> file, thus component1 could specify and as
> its packages, and would result in a jar containing the result of
> compiling all the java files in those directories ONLY - no
> subdirectories get pulled in, so would not be in
> component1's jar.

This translates to

<patternset id="component1">
  <include name="**/com/foo/util/*" />
  <include name="**/com/foo/bar/*" />

you could even use patternset's includesfile attribute to keep the
patterns outside of the buildfiles. Note the single * at the end of
each pattern to exclude subpackages.

> Where I get stuck is figuring out how to be able to specify a list
> of package directories in the project xml and then be able to use
> that list to limit my make rules to those directories, i.e. my javac
> task would only compile the java files in those directories, my
> ejbcompiler task would only process the ejbs in those directories,
> etc.

  <patternset refid="component1" />

for example.

Unfortunately not all tasks support patternsets as the should, javadoc
being a prominent exception.

I think this is what you've been asking for, but I'm not sure.


View raw message