On Wed, 11 Jul 2001, Ming-Fang Wang <[EMAIL PROTECTED]> wrote:

> Hi, I am trying to compile Java files in two packages, A and B. Some
> files in A depends on files B and vice versa. The question is how I
> should place javac tasks in the xml file. I cannot compile all the
> files in both A and B together, there are too many of them.

Sure?  How many are too many?  I've seen and run compilation processes
with thousands of java files in a single pass ...

> When I placed the tasks as below,
> 
> <javac srcdir="A" destdir="classes" />
> <javac srcdir="B" destdir="classes"/>
> 
> the first task shows error message claiming that some files in
> package B that appear in the import statements in some file in
> package A are not found.

something like

<javac destdir="classes">
  <src location="A" />
  <src location="B" />
  <exclude name="pattern-that-matches-most-files-in-A" />
</javac>

<javac destdir="classes">
  <src location="A" />
  <src location="B" />
  <exclude name="pattern-that-matches-most-files-in-B" />
</javac>

and use multiple excludes if you cannot come up with a single pattern.

Stefan

Reply via email to