conor       00/06/25 05:36:46

  Modified:    src/main/org/apache/tools/ant/taskdefs Javac.java
  Log:
  Deprecate the implicit copying of support files by Javac.
  
  Revision  Changes    Path
  1.14      +17 -14    
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java
  
  Index: Javac.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Javac.java        2000/06/24 10:55:45     1.13
  +++ Javac.java        2000/06/25 12:36:45     1.14
  @@ -237,6 +237,10 @@
           // copy the support files
   
           if (filecopyList.size() > 0) {
  +            project.log("The implicit copying of support files by javac has 
been deprecated. " + 
  +                        "Use the copydir task to copy support files 
explicitly.",
  +                        Project.MSG_WARN);
  +                
               project.log("Copying " + filecopyList.size() +
                           " support files to " + destDir.getAbsolutePath());
               Enumeration enum = filecopyList.keys();
  @@ -271,22 +275,21 @@
               File srcFile = new File(srcDir, files[i]);
               if (files[i].endsWith(".java")) {
                   File classFile = new File(destDir, files[i].substring(0,
  -                        files[i].indexOf(".java"))
  -                                                    + ".class");
  +                                          files[i].indexOf(".java")) + 
".class");
   
  -                    if (srcFile.lastModified() > now) {
  -                        project.log("Warning: file modified in the future: " 
+
  -                            files[i], project.MSG_WARN);
  -                    }
  -
  -                    if (srcFile.lastModified() > classFile.lastModified()) {
  -                        compileList.addElement(srcFile.getAbsolutePath());
  -                    }
  -                } else {
  +                if (srcFile.lastModified() > now) {
  +                    project.log("Warning: file modified in the future: " +
  +                        files[i], project.MSG_WARN);
  +                }
  +
  +                if (srcFile.lastModified() > classFile.lastModified()) {
  +                    compileList.addElement(srcFile.getAbsolutePath());
  +                }
  +            } else {
                   File destFile = new File(destDir, files[i]);
  -                    if (srcFile.lastModified() > destFile.lastModified()) {
  -                        filecopyList.put(srcFile.getAbsolutePath(),
  -                                         destFile.getAbsolutePath());
  +                if (srcFile.lastModified() > destFile.lastModified()) {
  +                    filecopyList.put(srcFile.getAbsolutePath(),
  +                                     destFile.getAbsolutePath());
                   }
               }
           }
  
  
  

Reply via email to