ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lopez, William" <>
Subject Confused about the <depend> and <javac> tasks
Date Thu, 24 Apr 2003 22:04:53 GMT
Hello List:

Please don't make me read the JVM spec :-)  I'm having problems with newer
[source] files not being compiled using <javac>. An example:

-- Source --
Action 1:  FileA last modified on 3/21/2003, checked in 3/27/2003, compiled
date 3/27/2003

Action 2:  FileA last modified on 3/24/2003, checked in 4/23/2003, *NOT*
compiled because .class file has newer date than this file.

***Action 2: different developer got FileA after Action 1, made the change
shortly after but sat on the file until recently.

Reading the Ant manual about <javac> it states:

Note: Ant uses only the names of the source and class files to find the
classes that need a rebuild. It will not scan the source and therefore will
have no knowledge about nested classes, classes that are named different
from the source file, and so on. See the <depend> task for dependency
checking based on other than just existence/modification times

...but when I go to the <depend> doco to find this statement:

Classes are considered out-of-date with respect to the source in the
${java.dir} directory, using the same mechanism as the <javac> task. sounds to me that <javac> is already doing what <depend> does? I'm
confused. If not, how do I use <depend> to help <javac> compile the source
in this scenario.

Thanks for any enlightment!


View raw message