ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs ExecuteOn.java
Date Mon, 16 Aug 2004 21:56:25 GMT
mbenson     2004/08/16 14:56:24

  Modified:    src/main/org/apache/tools/ant DirectoryScanner.java
               src/main/org/apache/tools/ant/types/optional/depend
                        DependScanner.java
               src/main/org/apache/tools/ant/taskdefs ExecuteOn.java
  Log:
  <apply> differentiating between empty and up to date broke <classfileset>s.
  PR: 30567
  
  Revision  Changes    Path
  1.73      +20 -0     ant/src/main/org/apache/tools/ant/DirectoryScanner.java
  
  Index: DirectoryScanner.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/DirectoryScanner.java,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- DirectoryScanner.java	13 May 2004 07:06:49 -0000	1.72
  +++ DirectoryScanner.java	16 Aug 2004 21:56:24 -0000	1.73
  @@ -1054,6 +1054,16 @@
       }
   
       /**
  +     * Return the count of included files.
  +     * @return <CODE>int</CODE>.
  +     * @since Ant 1.6.3
  +     */
  +    public int getIncludedFilesCount() {
  +        if (filesIncluded == null) throw new IllegalStateException();
  +        return filesIncluded.size();
  +    }
  +
  +    /**
        * Returns the names of the files which matched none of the include
        * patterns. The names are relative to the base directory. This involves
        * performing a slow scan if one has not already been completed.
  @@ -1119,6 +1129,16 @@
           dirsIncluded.copyInto(directories);
           Arrays.sort(directories);
           return directories;
  +    }
  +
  +    /**
  +     * Return the count of included directories.
  +     * @return <CODE>int</CODE>.
  +     * @since Ant 1.6.3
  +     */
  +    public int getIncludedDirsCount() {
  +        if (dirsIncluded == null) throw new IllegalStateException();
  +        return dirsIncluded.size();
       }
   
       /**
  
  
  
  1.20      +11 -0     ant/src/main/org/apache/tools/ant/types/optional/depend/DependScanner.java
  
  Index: DependScanner.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/optional/depend/DependScanner.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- DependScanner.java	10 Aug 2004 17:55:41 -0000	1.19
  +++ DependScanner.java	16 Aug 2004 21:56:24 -0000	1.20
  @@ -89,6 +89,12 @@
           return files;
       }
   
  +    //inherit doc
  +    public int getIncludedFilesCount() {
  +        if (included == null) throw new IllegalStateException();
  +        return included.size();
  +    }
  +
       /**
        * Scans the base directory for files that baseClass depends on
        *
  @@ -157,6 +163,11 @@
        */
       public String[] getIncludedDirectories() {
           return new String[0];
  +    }
  +
  +    //inherit doc
  +    public int getIncludedDirsCount() {
  +        return 0;
       }
   
       /**
  
  
  
  1.56      +2 -17     ant/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java
  
  Index: ExecuteOn.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- ExecuteOn.java	24 Jun 2004 19:44:02 -0000	1.55
  +++ ExecuteOn.java	16 Aug 2004 21:56:24 -0000	1.56
  @@ -43,18 +43,6 @@
    */
   public class ExecuteOn extends ExecTask {
   
  -    private class ExtendedDirectoryScanner extends DirectoryScanner {
  -        public int getIncludedFilesCount() {
  -            if (filesIncluded == null) throw new IllegalStateException();
  -            return filesIncluded.size();
  -        }
  -
  -        public int getIncludedDirsCount() {
  -            if (dirsIncluded == null) throw new IllegalStateException();
  -            return dirsIncluded.size();
  -        }
  -    }
  -
       protected Vector filesets = new Vector(); // contains AbstractFileSet
                                                 // (both DirSet and FileSet)
       private Vector filelists = new Vector();
  @@ -293,10 +281,7 @@
                   }
                   File base = fs.getDir(getProject());
   
  -                ExtendedDirectoryScanner ds = new ExtendedDirectoryScanner();
  -                fs.setupDirectoryScanner(ds, getProject());
  -                ds.setFollowSymlinks(fs.isFollowSymlinks());
  -                ds.scan();
  +                DirectoryScanner ds = fs.getDirectoryScanner(getProject());
   
                   if (!"dir".equals(currentType)) {
                       String[] s = getFiles(base, ds);
  @@ -379,7 +364,7 @@
                   }
   
                   if (fileNames.size() == 0 && skipEmpty) {
  -                    ExtendedDirectoryScanner ds = new ExtendedDirectoryScanner();
  +                    DirectoryScanner ds = new DirectoryScanner();
                       ds.setBasedir(base);
                       ds.setIncludes(list.getFiles(getProject()));
                       ds.scan();
  
  
  

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


Mime
View raw message