ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: Compiling java files in inter-dependent packages
Date Wed, 11 Jul 2001 15:40:25 GMT
On Thu, 12 Jul 2001 00:17, Ming-Fang Wang 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. 

Too many? I am not sure I can see that. I have helped setup projects that 
compile 1500 files in one sweep.

>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.
> How should I do?

Srcdir should be set to base of package hierarchy. So if your src files are 
in "src/java/com/biz/foo/*.java" (and their packages names are*) 
then you should have

<javac srcdir="src/java" destdir="classes">
  <include name="com/biz/foo/*.java" />



| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |

View raw message