ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hol...@apache.org
Subject cvs commit: jakarta-ant WHATSNEW
Date Wed, 27 Feb 2002 23:45:33 GMT
holtdl      02/02/27 15:45:33

  Modified:    src/main/org/apache/tools/ant/taskdefs Javac.java
               .        WHATSNEW
  Log:
  Add new 'listfiles' attribute to allow for listing the source files being
  handed off to the compiler.
  
  Revision  Changes    Path
  1.87      +22 -1     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.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- Javac.java	27 Feb 2002 20:36:12 -0000	1.86
  +++ Javac.java	27 Feb 2002 23:45:32 -0000	1.87
  @@ -103,7 +103,7 @@
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    * @author <a href="mailto:jayglanville@home.com">J D Glanville</a>
    *
  - * @version $Revision: 1.86 $
  + * @version $Revision: 1.87 $
    *
    * @ant:task category="java"
    */
  @@ -136,6 +136,7 @@
       private Vector implementationSpecificArgs = new Vector();
   
       protected boolean failOnError = true;
  +    protected boolean listFiles = false;
       protected File[] compileList = new File[0];
   
       private String source;
  @@ -371,6 +372,18 @@
       }
   
       /**
  +     * List the source files being handed off to the compiler
  +     */
  +    public void setListfiles(boolean list) {
  +        listFiles = list;
  +    }
  +
  +    /** Get the listfiles flag. */
  +    public boolean getListfiles() {
  +        return listFiles;
  +    }
  +
  +    /**
        * Throw a BuildException if compilation fails
        */
       public void setFailonerror(boolean fail) {
  @@ -805,6 +818,14 @@
                   " source file"
                   + (compileList.length == 1 ? "" : "s")
                   + (destDir != null ? " to " + destDir : ""));
  +
  +            if (listFiles) {
  +                for (int i=0 ; i < compileList.length ; i++)
  +                {
  +                  String filename = compileList[i].getAbsolutePath();
  +                  log(filename) ;
  +                }
  +            }
   
               CompilerAdapter adapter = 
                   CompilerAdapterFactory.getCompiler(compilerImpl, this);
  
  
  
  1.218     +3 -0      jakarta-ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/WHATSNEW,v
  retrieving revision 1.217
  retrieving revision 1.218
  diff -u -r1.217 -r1.218
  --- WHATSNEW	27 Feb 2002 09:02:40 -0000	1.217
  +++ WHATSNEW	27 Feb 2002 23:45:33 -0000	1.218
  @@ -176,6 +176,9 @@
   
   * you can now specify the -sourcepath for <javac> explicitly.
   
  +* <javac> now supports a new "listfiles" attribute to list the source
  +  files it's handing off to the compiler.
  +
   * The compiler implementation for javac can now be chosen on a task by
     task basis.  Use the new compiler attribute of <javac> to override
     the build.compiler property.
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message