ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <ddevie...@gmail.com>
Subject Re: Confused at build error
Date Wed, 24 Jun 2009 13:57:18 GMT
On Wed, Jun 24, 2009 at 2:40 AM, dori<dorian.cussen@googlemail.com> wrote:
> Hello, i have a small ant build file that i wrote a little while ago, it's
> always worked fine but now it has started to give me errors. With the -debug
> arg i get
>
> [javac]Compiling 2 source files
> ....
> [javac]     sourcefile1.java
>    [javac]    scorcefile2.java
>    [javac] scorcefile3.java:5: package packageName does not exist
>    [javac] import packageName.className;
>
> I can see that it's compiling the sourcefile1 & 2 files, which its ment too,
> but then finds an error with source file 3 which isnt referenced by either
> sourcefile 1 or 2 and brings the total source files to compile to 3. What
> could be causing this?

Javac is "greedy", i.e. you tell it to compile some classes, it does, but
if any of those classes reference any other classes, directly or *indirectly*,
which cannot be found on the compile classpath, it attempts to locate their
sources using the compile sourcepath and compile them.

That's likely what is happening here. Tools like JDepend (being around
for a long time,
I suppose Java IDEs have the equivalent now) allow you to explore
class dependencies
in detail. I don't think this has anything to do with Ant. See what
changes in your
sources recently. --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message