Browse Source

Provide an explanation, at verbose level, of why Javac decides to compile

certain classes.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267931 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 25 years ago
parent
commit
ef6aec8251
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      src/main/org/apache/tools/ant/taskdefs/Javac.java

+ 9
- 1
src/main/org/apache/tools/ant/taskdefs/Javac.java View File

@@ -360,7 +360,15 @@ public class Javac extends MatchingTask {
files[i], Project.MSG_WARN);
}

if (srcFile.lastModified() > classFile.lastModified()) {
if (!classFile.exists() || srcFile.lastModified() > classFile.lastModified()) {
if (!classFile.exists()) {
log("Compiling " + srcFile.getPath() + " because class file "
+ classFile.getPath() + " does not exist", Project.MSG_VERBOSE);
}
else {
log("Compiling " + srcFile.getPath() + " because it is out of date with respect to "
+ classFile.getPath(), Project.MSG_VERBOSE);
}
compileList.addElement(srcFile.getAbsolutePath());
}
}


Loading…
Cancel
Save