ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/types FileSet.java
Date Wed, 14 Mar 2001 12:48:36 GMT
bodewig     01/03/14 04:48:34

  Modified:    .        WHATSNEW
               src/main/org/apache/tools/ant/types FileSet.java
  Log:
  Defer sanity checks of dir attribute to the point where the fileset
  will be used for the first time. This will enable things like
  
  <project default="main">
    <fileset dir="tmp" id="tmpfiles">
  
    <target name="prep">
      <mkdir dir="tmp" />
    </target>
  
    <target name="main" depends="prep">
      <copy todir="foo">
        <fileset refid="tmpfiles" />
      </copy>
    </target>
  </project>
  
  Revision  Changes    Path
  1.87      +4 -0      jakarta-ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/WHATSNEW,v
  retrieving revision 1.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- WHATSNEW	2001/03/14 12:35:37	1.86
  +++ WHATSNEW	2001/03/14 12:48:26	1.87
  @@ -29,6 +29,10 @@
   * <delete includeemptydirs="true"> now deletes more than just the leaf
     directories.
   
  +* You can now specify a <fileset> for a directory that doesn't exist at
  +  declaration time but will created before the fileset gets used for the
  +  first time.
  +
   Changes from Ant 1.2 to Ant 1.3
   ===========================================
   
  
  
  
  1.15      +7 -6      jakarta-ant/src/main/org/apache/tools/ant/types/FileSet.java
  
  Index: FileSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/FileSet.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- FileSet.java	2001/02/04 13:58:17	1.14
  +++ FileSet.java	2001/03/14 12:48:32	1.15
  @@ -116,12 +116,6 @@
               throw tooManyAttributes();
           }
   
  -        if (!dir.exists()) {
  -            throw new BuildException(dir.getAbsolutePath()+" not found.");
  -        }
  -        if (!dir.isDirectory()) {
  -            throw new BuildException(dir.getAbsolutePath()+" is not a directory.");
  -        }
           this.dir = dir;
       }
   
  @@ -240,6 +234,13 @@
   
           if (dir == null) {
               throw new BuildException("No directory specified for fileset.");
  +        }
  +
  +        if (!dir.exists()) {
  +            throw new BuildException(dir.getAbsolutePath()+" not found.");
  +        }
  +        if (!dir.isDirectory()) {
  +            throw new BuildException(dir.getAbsolutePath()+" is not a directory.");
           }
   
           DirectoryScanner ds = new DirectoryScanner();
  
  
  

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


Mime
View raw message