ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Combining PatternSets with Path elements
Date Thu, 09 Nov 2000 17:03:41 GMT

Sort of.  What I had in mind was the following:

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

<target name="compile">
          <!-- This is fine because javac task knows to only look for
*.java files -->
          <patternset refid="packages"/>

<target name="some_other_task">
     <!-- I want this task to copy all *.foo files elsewhere, but can't
figure out
     how to make the copy task only look for *.foo files, and not others.
     <copy todir="outputdir">
               <patternset refid="packages"/>

I can't figure out how to reuse the patternset in some other task (just
using copy as an example) with different extensions - the patternset
selects all files, and not _just_ the *.foo files.  Any ideas? Thanks,


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

> 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