ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix Chmod.java
Date Sat, 26 Jan 2002 02:08:11 GMT
donaldp     02/01/25 18:08:11

  Modified:    proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs
                        Checksum.java DependSet.java Expand.java
                        MatchingTask.java SQLExec.java TarFileSet.java
                        UpToDate.java Zip.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/exec
                        ExecuteOn.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file
                        Copy.java Delete.java Touch.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc
                        Javadoc.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional
                        Cab.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb
                        GenericDeploymentTool.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/i18n
                        Translate.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide
                        VAJExport.java VAJImport.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit
                        BatchTest.java XMLResultAggregator.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata
                        AbstractMetamataTask.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net
                        FTP.java MimeMail.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce
                        P4Add.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sitraka
                        CovMerge.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/text
                        ReplaceRegExp.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix
                        Chmod.java
  Log:
  Update tasks to reflect movement of logic from objects to service/utility objects
  
  Revision  Changes    Path
  1.15      +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Checksum.java
  
  Index: Checksum.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Checksum.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Checksum.java	20 Jan 2002 02:11:42 -0000	1.14
  +++ Checksum.java	26 Jan 2002 02:08:10 -0000	1.15
  @@ -26,6 +26,7 @@
   import org.apache.tools.ant.taskdefs.condition.Condition;
   import org.apache.tools.ant.types.DirectoryScanner;
   import org.apache.tools.ant.types.FileSet;
  +import org.apache.tools.ant.types.ScannerUtil;
   
   /**
    * This task can be used to create checksums for files. It can also be used to
  @@ -502,7 +503,7 @@
           for( int i = 0; i < size; i++ )
           {
               final FileSet fileSet = (FileSet)m_filesets.get( i );
  -            final DirectoryScanner scanner = fileSet.getDirectoryScanner();
  +            final DirectoryScanner scanner = ScannerUtil.getDirectoryScanner( fileSet );
               final String[] srcFiles = scanner.getIncludedFiles();
               for( int j = 0; j < srcFiles.length; j++ )
               {
  
  
  
  1.12      +4 -3      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/DependSet.java
  
  Index: DependSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/DependSet.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- DependSet.java	13 Jan 2002 00:00:15 -0000	1.11
  +++ DependSet.java	26 Jan 2002 02:08:10 -0000	1.12
  @@ -16,6 +16,7 @@
   import org.apache.tools.ant.types.DirectoryScanner;
   import org.apache.tools.ant.types.FileList;
   import org.apache.tools.ant.types.FileSet;
  +import org.apache.tools.ant.types.ScannerUtil;
   
   /**
    * A Task to record explicit dependencies. If any of the target files are out of
  @@ -59,7 +60,7 @@
    *
    *
    * @author <a href="mailto:cstrong@arielpartners.com">Craeg Strong</a>
  - * @version $Revision: 1.11 $ $Date: 2002/01/13 00:00:15 $
  + * @version $Revision: 1.12 $ $Date: 2002/01/26 02:08:10 $
    */
   public class DependSet extends MatchingTask
   {
  @@ -154,7 +155,7 @@
           {
   
               FileSet targetFS = (FileSet)enumTargetSets.next();
  -            DirectoryScanner targetDS = targetFS.getDirectoryScanner();
  +            DirectoryScanner targetDS = ScannerUtil.getDirectoryScanner( targetFS );
               String[] targetFiles = targetDS.getIncludedFiles();
   
               for( int i = 0; i < targetFiles.length; i++ )
  @@ -212,7 +213,7 @@
               {
   
                   FileSet sourceFS = (FileSet)enumSourceSets.next();
  -                DirectoryScanner sourceDS = sourceFS.getDirectoryScanner();
  +                DirectoryScanner sourceDS = ScannerUtil.getDirectoryScanner( sourceFS );
                   String[] sourceFiles = sourceDS.getIncludedFiles();
   
                   for( int i = 0; upToDate && i < sourceFiles.length; i++ )
  
  
  
  1.18      +7 -3      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Expand.java
  
  Index: Expand.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Expand.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Expand.java	25 Jan 2002 23:21:21 -0000	1.17
  +++ Expand.java	26 Jan 2002 02:08:10 -0000	1.18
  @@ -19,9 +19,11 @@
   import java.util.zip.ZipInputStream;
   import org.apache.avalon.excalibur.io.FileUtil;
   import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.api.TaskContext;
   import org.apache.tools.ant.types.DirectoryScanner;
   import org.apache.tools.ant.types.FileSet;
   import org.apache.myrmidon.framework.PatternSet;
  +import org.apache.myrmidon.framework.PatternUtil;
   import org.apache.tools.ant.types.ScannerUtil;
   
   /**
  @@ -132,7 +134,7 @@
               for( int j = 0; j < filesets.size(); j++ )
               {
                   FileSet fs = (FileSet)filesets.get( j );
  -                DirectoryScanner ds = fs.getDirectoryScanner();
  +                DirectoryScanner ds = ScannerUtil.getDirectoryScanner( fs );
                   File fromDir = fs.getDir();
   
                   String[] files = ds.getIncludedFiles();
  @@ -201,7 +203,8 @@
               for( int v = 0; v < patternsets.size(); v++ )
               {
                   PatternSet p = (PatternSet)patternsets.get( v );
  -                String[] incls = p.getIncludePatterns( getContext() );
  +                final TaskContext context = getContext();
  +                String[] incls = PatternUtil.getIncludePatterns( p, context );
                   if( incls != null )
                   {
                       for( int w = 0; w < incls.length; w++ )
  @@ -214,7 +217,8 @@
                           }
                       }
                   }
  -                String[] excls = p.getExcludePatterns( getContext() );
  +                final TaskContext context1 = getContext();
  +                String[] excls = PatternUtil.getExcludePatterns( p, context1 );
                   if( excls != null )
                   {
                       for( int w = 0; w < excls.length; w++ )
  
  
  
  1.15      +4 -6      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java
  
  Index: MatchingTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- MatchingTask.java	25 Jan 2002 23:21:21 -0000	1.14
  +++ MatchingTask.java	26 Jan 2002 02:08:10 -0000	1.15
  @@ -13,6 +13,7 @@
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.types.DirectoryScanner;
   import org.apache.tools.ant.types.FileSet;
  +import org.apache.tools.ant.types.ScannerUtil;
   import org.apache.myrmidon.framework.PatternSet;
   
   /**
  @@ -83,13 +84,10 @@
   
       /**
        * add a set of patterns
  -     *
  -     * @return Description of the Returned Value
        */
  -    public PatternSet createPatternSet()
  -        throws TaskException
  +    public void addPatternSet( final PatternSet set )
       {
  -        return m_fileset.createPatternSet();
  +        m_fileset.addPatternSet( set );
       }
   
       /**
  @@ -103,6 +101,6 @@
       {
           m_fileset.setDir( baseDir );
           m_fileset.setDefaultexcludes( m_useDefaultExcludes );
  -        return m_fileset.getDirectoryScanner();
  +        return ScannerUtil.getDirectoryScanner( m_fileset );
       }
   }
  
  
  
  1.23      +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
  
  Index: SQLExec.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/SQLExec.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- SQLExec.java	20 Jan 2002 17:35:00 -0000	1.22
  +++ SQLExec.java	26 Jan 2002 02:08:10 -0000	1.23
  @@ -39,6 +39,7 @@
   import org.apache.tools.ant.types.FileSet;
   import org.apache.tools.ant.types.Path;
   import org.apache.tools.ant.types.PathUtil;
  +import org.apache.tools.ant.types.ScannerUtil;
   
   /**
    * Reads in a text file containing SQL statements seperated with semicolons and
  @@ -382,7 +383,7 @@
               for( int i = 0; i < filesets.size(); i++ )
               {
                   FileSet fs = (FileSet)filesets.get( i );
  -                DirectoryScanner ds = fs.getDirectoryScanner();
  +                DirectoryScanner ds = ScannerUtil.getDirectoryScanner( fs );
                   File srcDir = fs.getDir();
   
                   String[] srcFiles = ds.getIncludedFiles();
  
  
  
  1.2       +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/TarFileSet.java
  
  Index: TarFileSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/TarFileSet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TarFileSet.java	20 Jan 2002 02:11:42 -0000	1.1
  +++ TarFileSet.java	26 Jan 2002 02:08:10 -0000	1.2
  @@ -9,6 +9,7 @@
   
   import org.apache.tools.ant.types.FileSet;
   import org.apache.tools.ant.types.DirectoryScanner;
  +import org.apache.tools.ant.types.ScannerUtil;
   import org.apache.myrmidon.api.TaskException;
   
   public class TarFileSet
  @@ -46,7 +47,7 @@
       {
           if( m_files == null )
           {
  -            final DirectoryScanner scanner = getDirectoryScanner();
  +            final DirectoryScanner scanner = ScannerUtil.getDirectoryScanner( this );
               final String[] directories = scanner.getIncludedDirectories();
               final String[] filesPerSe = scanner.getIncludedFiles();
               m_files = new String[ directories.length + filesPerSe.length ];
  
  
  
  1.19      +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
  
  Index: UpToDate.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/UpToDate.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- UpToDate.java	20 Jan 2002 17:35:00 -0000	1.18
  +++ UpToDate.java	26 Jan 2002 02:08:10 -0000	1.19
  @@ -18,6 +18,7 @@
   import org.apache.tools.ant.util.mappers.FileNameMapper;
   import org.apache.tools.ant.util.mappers.MergingMapper;
   import org.apache.tools.ant.types.SourceFileScanner;
  +import org.apache.tools.ant.types.ScannerUtil;
   
   /**
    * Will set the given property if the specified target has a timestamp greater
  @@ -128,7 +129,7 @@
           while( upToDate && enum.hasNext() )
           {
               FileSet fs = (FileSet)enum.next();
  -            DirectoryScanner ds = fs.getDirectoryScanner();
  +            DirectoryScanner ds = ScannerUtil.getDirectoryScanner( fs );
               upToDate = upToDate && scanDir( fs.getDir(),
                                               ds.getIncludedFiles() );
           }
  
  
  
  1.19      +3 -2      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Zip.java
  
  Index: Zip.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Zip.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Zip.java	20 Jan 2002 17:35:00 -0000	1.18
  +++ Zip.java	26 Jan 2002 02:08:10 -0000	1.19
  @@ -27,6 +27,7 @@
   import org.apache.tools.ant.types.SourceFileScanner;
   import org.apache.tools.ant.types.ZipFileSet;
   import org.apache.tools.ant.types.ZipScanner;
  +import org.apache.tools.ant.types.ScannerUtil;
   import org.apache.tools.ant.util.mappers.MergingMapper;
   import org.apache.aut.zip.ZipEntry;
   import org.apache.aut.zip.ZipOutputStream;
  @@ -266,7 +267,7 @@
           for( int i = 0; i < m_filesets.size(); i++ )
           {
               FileSet fs = (FileSet)m_filesets.get( i );
  -            dss.add( fs.getDirectoryScanner() );
  +            dss.add( ScannerUtil.getDirectoryScanner( fs ) );
           }
           int dssSize = dss.size();
           FileScanner[] scanners = new FileScanner[ dssSize ];
  @@ -556,7 +557,7 @@
           for( int i = 0; i < filesets.size(); i++ )
           {
               FileSet fs = (FileSet)filesets.get( i );
  -            DirectoryScanner ds = fs.getDirectoryScanner();
  +            DirectoryScanner ds = ScannerUtil.getDirectoryScanner( fs );
   
               String prefix = "";
               String fullpath = "";
  
  
  
  1.7       +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/exec/ExecuteOn.java
  
  Index: ExecuteOn.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/exec/ExecuteOn.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ExecuteOn.java	20 Jan 2002 03:23:55 -0000	1.6
  +++ ExecuteOn.java	26 Jan 2002 02:08:10 -0000	1.7
  @@ -17,6 +17,7 @@
   import org.apache.tools.ant.types.FileSet;
   import org.apache.tools.ant.types.Marker;
   import org.apache.tools.ant.types.SourceFileScanner;
  +import org.apache.tools.ant.types.ScannerUtil;
   import org.apache.tools.ant.util.mappers.FileNameMapper;
   import org.apache.tools.ant.util.mappers.Mapper;
   
  @@ -369,7 +370,7 @@
               {
                   final FileSet fs = (FileSet)m_filesets.get( i );
                   final File base = fs.getDir();
  -                final DirectoryScanner ds = fs.getDirectoryScanner();
  +                final DirectoryScanner ds = ScannerUtil.getDirectoryScanner( fs );
   
                   if( !"dir".equals( m_type ) )
                   {
  
  
  
  1.16      +3 -2      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Copy.java
  
  Index: Copy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Copy.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Copy.java	20 Jan 2002 02:36:20 -0000	1.15
  +++ Copy.java	26 Jan 2002 02:08:10 -0000	1.16
  @@ -26,6 +26,7 @@
   import org.apache.tools.ant.util.mappers.FlatFileNameMapper;
   import org.apache.tools.ant.util.mappers.IdentityMapper;
   import org.apache.tools.ant.types.SourceFileScanner;
  +import org.apache.tools.ant.types.ScannerUtil;
   
   /**
    * A consolidated copy task. Copies a file or directory to a new file or
  @@ -229,7 +230,7 @@
           for( int i = 0; i < m_filesets.size(); i++ )
           {
               final FileSet fileSet = (FileSet)m_filesets.get( i );
  -            final DirectoryScanner scanner = fileSet.getDirectoryScanner();
  +            final DirectoryScanner scanner = ScannerUtil.getDirectoryScanner( fileSet );
               final File fromDir = fileSet.getDir();
   
               final String[] srcFiles = scanner.getIncludedFiles();
  @@ -487,7 +488,7 @@
               else
               {
                   FileSet fs = (FileSet)m_filesets.get( 0 );
  -                DirectoryScanner ds = fs.getDirectoryScanner();
  +                DirectoryScanner ds = ScannerUtil.getDirectoryScanner( fs );
                   String[] srcFiles = ds.getIncludedFiles();
   
                   if( srcFiles.length > 0 )
  
  
  
  1.11      +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Delete.java
  
  Index: Delete.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Delete.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Delete.java	12 Jan 2002 23:50:01 -0000	1.10
  +++ Delete.java	26 Jan 2002 02:08:10 -0000	1.11
  @@ -13,6 +13,7 @@
   import org.apache.tools.ant.types.DirectoryScanner;
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.types.FileSet;
  +import org.apache.tools.ant.types.ScannerUtil;
   
   /**
    * Deletes a file or directory, or set of files defined by a fileset. The
  @@ -126,7 +127,7 @@
               FileSet fs = (FileSet)filesets.get( i );
               try
               {
  -                DirectoryScanner ds = fs.getDirectoryScanner();
  +                DirectoryScanner ds = ScannerUtil.getDirectoryScanner( fs );
                   String[] files = ds.getIncludedFiles();
                   String[] dirs = ds.getIncludedDirectories();
                   removeFiles( fs.getDir(), files, dirs );
  
  
  
  1.6       +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Touch.java
  
  Index: Touch.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Touch.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Touch.java	12 Jan 2002 23:50:01 -0000	1.5
  +++ Touch.java	26 Jan 2002 02:08:10 -0000	1.6
  @@ -18,6 +18,7 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.types.DirectoryScanner;
   import org.apache.tools.ant.types.FileSet;
  +import org.apache.tools.ant.types.ScannerUtil;
   
   /**
    * Touch a file and/or fileset(s) -- corresponds to the Unix touch command. <p>
  @@ -157,7 +158,7 @@
           for( int i = 0; i < size; i++ )
           {
               final FileSet fs = (FileSet)m_filesets.get( i );
  -            final DirectoryScanner ds = fs.getDirectoryScanner();
  +            final DirectoryScanner ds = ScannerUtil.getDirectoryScanner( fs );
               final File fromDir = fs.getDir();
   
               final String[] srcFiles = ds.getIncludedFiles();
  
  
  
  1.19      +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java
  
  Index: Javadoc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Javadoc.java	23 Jan 2002 10:21:53 -0000	1.18
  +++ Javadoc.java	26 Jan 2002 02:08:10 -0000	1.19
  @@ -26,6 +26,7 @@
   import org.apache.tools.ant.types.Commandline;
   import org.apache.tools.ant.types.FileSet;
   import org.apache.tools.ant.types.Path;
  +import org.apache.tools.ant.types.ScannerUtil;
   
   /**
    * This task makes it easy to generate Javadoc documentation for a collection of
  @@ -984,7 +985,7 @@
                   final File source = resolveFile( list[ j ] );
                   fs.setDir( source );
   
  -                final DirectoryScanner ds = fs.getDirectoryScanner();
  +                final DirectoryScanner ds = ScannerUtil.getDirectoryScanner( fs );
                   final String[] packageDirs = ds.getIncludedDirectories();
   
                   for( int i = 0; i < packageDirs.length; i++ )
  
  
  
  1.22      +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java
  
  Index: Cab.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- Cab.java	20 Jan 2002 17:34:59 -0000	1.21
  +++ Cab.java	26 Jan 2002 02:08:10 -0000	1.22
  @@ -21,6 +21,7 @@
   import org.apache.tools.ant.taskdefs.exec.Execute2;
   import org.apache.tools.ant.types.Commandline;
   import org.apache.tools.ant.types.FileSet;
  +import org.apache.tools.ant.types.ScannerUtil;
   
   /**
    * Create a CAB archive.
  @@ -174,7 +175,7 @@
                   FileSet fs = (FileSet)m_filesets.get( i );
                   if( fs != null )
                   {
  -                    appendFiles( files, fs.getDirectoryScanner() );
  +                    appendFiles( files, ScannerUtil.getDirectoryScanner( fs ) );
                   }
               }
           }
  
  
  
  1.17      +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
  
  Index: GenericDeploymentTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- GenericDeploymentTool.java	20 Jan 2002 17:35:00 -0000	1.16
  +++ GenericDeploymentTool.java	26 Jan 2002 02:08:10 -0000	1.17
  @@ -36,6 +36,7 @@
   import org.apache.tools.ant.types.FileSet;
   import org.apache.tools.ant.types.Path;
   import org.apache.tools.ant.types.PathUtil;
  +import org.apache.tools.ant.types.ScannerUtil;
   import org.apache.tools.ant.util.depend.Dependencies;
   import org.apache.tools.ant.util.depend.Filter;
   import org.xml.sax.InputSource;
  @@ -567,7 +568,7 @@
           {
               FileSet supportFileSet = (FileSet)i.next();
               File supportBaseDir = supportFileSet.getDir();
  -            DirectoryScanner supportScanner = supportFileSet.getDirectoryScanner();
  +            DirectoryScanner supportScanner = ScannerUtil.getDirectoryScanner( supportFileSet
);
               supportScanner.scan();
               String[] supportFiles = supportScanner.getIncludedFiles();
               for( int j = 0; j < supportFiles.length; ++j )
  
  
  
  1.13      +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java
  
  Index: Translate.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Translate.java	12 Jan 2002 23:51:25 -0000	1.12
  +++ Translate.java	26 Jan 2002 02:08:11 -0000	1.13
  @@ -23,6 +23,7 @@
   import org.apache.tools.ant.types.DirectoryScanner;
   import org.apache.tools.ant.taskdefs.MatchingTask;
   import org.apache.tools.ant.types.FileSet;
  +import org.apache.tools.ant.types.ScannerUtil;
   
   /**
    * Translates text embedded in files using Resource Bundle files.
  @@ -518,7 +519,7 @@
           for( int i = 0; i < filesets.size(); i++ )
           {
               FileSet fs = (FileSet)filesets.get( i );
  -            DirectoryScanner ds = fs.getDirectoryScanner();
  +            DirectoryScanner ds = ScannerUtil.getDirectoryScanner( fs );
               String[] srcFiles = ds.getIncludedFiles();
               for( int j = 0; j < srcFiles.length; j++ )
               {
  
  
  
  1.9       +6 -2      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJExport.java
  
  Index: VAJExport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJExport.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- VAJExport.java	25 Jan 2002 23:21:21 -0000	1.8
  +++ VAJExport.java	26 Jan 2002 02:08:11 -0000	1.9
  @@ -9,8 +9,10 @@
   
   import java.io.File;
   import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.framework.Pattern;
   import org.apache.myrmidon.framework.PatternSet;
  +import org.apache.myrmidon.framework.PatternUtil;
   
   /**
    * Export packages from the Visual Age for Java workspace. The packages are
  @@ -172,9 +174,11 @@
           }
   
           // delegate the export to the VAJUtil object.
  +        final TaskContext context = getContext();
  +        final TaskContext context1 = getContext();
           getUtil().exportPackages( destDir,
  -                                  patternSet.getIncludePatterns( getContext() ),
  -                                  patternSet.getExcludePatterns( getContext() ),
  +                                  PatternUtil.getIncludePatterns( patternSet, context ),
  +                                  PatternUtil.getExcludePatterns( patternSet, context1
),
                                     exportClasses, exportDebugInfo,
                                     exportResources, exportSources,
                                     useDefaultExcludes, overwrite );
  
  
  
  1.9       +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJImport.java
  
  Index: VAJImport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJImport.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- VAJImport.java	13 Jan 2002 00:01:42 -0000	1.8
  +++ VAJImport.java	26 Jan 2002 02:08:11 -0000	1.9
  @@ -13,6 +13,7 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.types.DirectoryScanner;
   import org.apache.tools.ant.types.FileSet;
  +import org.apache.tools.ant.types.ScannerUtil;
   
   /**
    * Import source, class files, and resources to the Visual Age for Java
  @@ -224,7 +225,7 @@
        */
       protected void importFileset( FileSet fileset )
       {
  -        DirectoryScanner ds = fileset.getDirectoryScanner();
  +        DirectoryScanner ds = ScannerUtil.getDirectoryScanner( fileset );
           if( ds.getIncludedFiles().length == 0 )
           {
               return;
  
  
  
  1.10      +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/BatchTest.java
  
  Index: BatchTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/BatchTest.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- BatchTest.java	20 Jan 2002 17:35:00 -0000	1.9
  +++ BatchTest.java	26 Jan 2002 02:08:11 -0000	1.10
  @@ -15,6 +15,7 @@
   import org.apache.tools.ant.types.DirectoryScanner;
   
   import org.apache.tools.ant.types.FileSet;
  +import org.apache.tools.ant.types.ScannerUtil;
   
   /**
    * <p>
  @@ -116,7 +117,7 @@
           for( int j = 0; j < size; j++ )
           {
               FileSet fs = (FileSet)filesets.get( j );
  -            DirectoryScanner ds = fs.getDirectoryScanner();
  +            DirectoryScanner ds = ScannerUtil.getDirectoryScanner( fs );
               ds.scan();
               String[] f = ds.getIncludedFiles();
               for( int k = 0; k < f.length; k++ )
  
  
  
  1.16      +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java
  
  Index: XMLResultAggregator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- XMLResultAggregator.java	13 Jan 2002 05:09:23 -0000	1.15
  +++ XMLResultAggregator.java	26 Jan 2002 02:08:11 -0000	1.16
  @@ -22,6 +22,7 @@
   import org.apache.tools.ant.types.DirectoryScanner;
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.types.FileSet;
  +import org.apache.tools.ant.types.ScannerUtil;
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
   import org.xml.sax.SAXException;
  @@ -201,7 +202,7 @@
           for( int i = 0; i < size; i++ )
           {
               final FileSet fileSet = (FileSet)filesets.get( i );
  -            final DirectoryScanner scanner = fileSet.getDirectoryScanner();
  +            final DirectoryScanner scanner = ScannerUtil.getDirectoryScanner( fileSet );
               scanner.scan();
               final String[] includes = scanner.getIncludedFiles();
               for( int j = 0; j < includes.length; j++ )
  
  
  
  1.22      +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java
  
  Index: AbstractMetamataTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- AbstractMetamataTask.java	20 Jan 2002 17:34:59 -0000	1.21
  +++ AbstractMetamataTask.java	26 Jan 2002 02:08:11 -0000	1.22
  @@ -23,6 +23,7 @@
   import org.apache.tools.ant.types.CommandlineJava;
   import org.apache.tools.ant.types.FileSet;
   import org.apache.tools.ant.types.Path;
  +import org.apache.tools.ant.types.ScannerUtil;
   
   /**
    * Somewhat abstract framework to be used for other metama 2.0 tasks. This
  @@ -338,7 +339,7 @@
           for( int i = 0; i < m_fileSets.size(); i++ )
           {
               FileSet fs = (FileSet)m_fileSets.get( i );
  -            DirectoryScanner ds = fs.getDirectoryScanner();
  +            DirectoryScanner ds = ScannerUtil.getDirectoryScanner( fs );
               ds.scan();
               String[] f = ds.getIncludedFiles();
               getLogger().debug( i + ") Adding " + f.length + " files from directory " +
ds.getBasedir() );
  
  
  
  1.14      +7 -2      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
  
  Index: FTP.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- FTP.java	20 Jan 2002 17:35:01 -0000	1.13
  +++ FTP.java	26 Jan 2002 02:08:11 -0000	1.14
  @@ -23,9 +23,12 @@
   import java.util.ArrayList;
   import org.apache.avalon.excalibur.io.FileUtil;
   import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.api.TaskContext;
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.types.FileScanner;
   import org.apache.tools.ant.types.FileSet;
  +import org.apache.tools.ant.types.ScannerUtil;
  +import org.apache.tools.ant.types.DirectoryScanner;
   
   /**
    * Basic FTP client that performs the following actions:
  @@ -772,12 +775,14 @@
   
           if( m_action == SEND_FILES )
           {
  -            ds = fs.getDirectoryScanner();
  +            ds = ScannerUtil.getDirectoryScanner( fs );
           }
           else
           {
               ds = new FTPDirectoryScanner( ftp );
  -            fs.setupDirectoryScanner( ds );
  +            final FileScanner ds1 = ds;
  +            final TaskContext context = getContext();
  +            ScannerUtil.setupDirectoryScanner( fs, ds1, context );
               ds.scan();
           }
   
  
  
  
  1.14      +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java
  
  Index: MimeMail.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- MimeMail.java	20 Jan 2002 17:35:01 -0000	1.13
  +++ MimeMail.java	26 Jan 2002 02:08:11 -0000	1.14
  @@ -27,6 +27,7 @@
   import org.apache.tools.ant.types.DirectoryScanner;
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.types.FileSet;
  +import org.apache.tools.ant.types.ScannerUtil;
   
   /**
    * A task to send SMTP email. This version has near identical syntax to the
  @@ -309,7 +310,7 @@
               FileSet fs = (FileSet)filesets.get( i );
               if( fs != null )
               {
  -                DirectoryScanner ds = fs.getDirectoryScanner();
  +                DirectoryScanner ds = ScannerUtil.getDirectoryScanner( fs );
                   String[] dsfiles = ds.getIncludedFiles();
                   File baseDir = ds.getBasedir();
   
  
  
  
  1.11      +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java
  
  Index: P4Add.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- P4Add.java	20 Jan 2002 17:35:02 -0000	1.10
  +++ P4Add.java	26 Jan 2002 02:08:11 -0000	1.11
  @@ -12,6 +12,7 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.types.DirectoryScanner;
   import org.apache.tools.ant.types.FileSet;
  +import org.apache.tools.ant.types.ScannerUtil;
   
   /**
    * P4Add - add the specified files to perforce. <b>Example Usage:</b>
  @@ -125,7 +126,7 @@
           for( int i = 0; i < filesets.size(); i++ )
           {
               FileSet fs = (FileSet)filesets.get( i );
  -            DirectoryScanner ds = fs.getDirectoryScanner();
  +            DirectoryScanner ds = ScannerUtil.getDirectoryScanner( fs );
               //File fromDir = fs.getDir(project);
   
               String[] srcFiles = ds.getIncludedFiles();
  
  
  
  1.16      +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovMerge.java
  
  Index: CovMerge.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovMerge.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- CovMerge.java	20 Jan 2002 02:11:44 -0000	1.15
  +++ CovMerge.java	26 Jan 2002 02:08:11 -0000	1.16
  @@ -19,6 +19,7 @@
   import org.apache.tools.ant.taskdefs.exec.Execute2;
   import org.apache.tools.ant.types.Commandline;
   import org.apache.tools.ant.types.FileSet;
  +import org.apache.tools.ant.types.ScannerUtil;
   
   /**
    * Convenient task to run the snapshot merge utility for JProbe Coverage.
  @@ -150,7 +151,7 @@
           for( int i = 0; i < size; i++ )
           {
               FileSet fs = (FileSet)filesets.get( i );
  -            DirectoryScanner ds = fs.getDirectoryScanner();
  +            DirectoryScanner ds = ScannerUtil.getDirectoryScanner( fs );
               ds.scan();
               String[] f = ds.getIncludedFiles();
               for( int j = 0; j < f.length; j++ )
  
  
  
  1.6       +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/text/ReplaceRegExp.java
  
  Index: ReplaceRegExp.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/text/ReplaceRegExp.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ReplaceRegExp.java	20 Jan 2002 17:35:01 -0000	1.5
  +++ ReplaceRegExp.java	26 Jan 2002 02:08:11 -0000	1.6
  @@ -20,6 +20,7 @@
   import org.apache.tools.ant.types.DirectoryScanner;
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.types.FileSet;
  +import org.apache.tools.ant.types.ScannerUtil;
   import org.apache.tools.ant.util.regexp.Regexp;
   
   /**
  @@ -216,7 +217,7 @@
           for( int i = 0; i < sz; i++ )
           {
               FileSet fs = (FileSet)( filesets.get( i ) );
  -            DirectoryScanner ds = fs.getDirectoryScanner();
  +            DirectoryScanner ds = ScannerUtil.getDirectoryScanner( fs );
   
               String files[] = ds.getIncludedFiles();
               for( int j = 0; j < files.length; j++ )
  
  
  
  1.13      +7 -12     jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix/Chmod.java
  
  Index: Chmod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix/Chmod.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Chmod.java	25 Jan 2002 23:21:21 -0000	1.12
  +++ Chmod.java	26 Jan 2002 02:08:11 -0000	1.13
  @@ -12,11 +12,11 @@
   import org.apache.aut.nativelib.Os;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.framework.Pattern;
  +import org.apache.myrmidon.framework.PatternSet;
   import org.apache.tools.ant.taskdefs.exec.Execute;
   import org.apache.tools.ant.taskdefs.exec.ExecuteOn;
   import org.apache.tools.ant.types.Argument;
   import org.apache.tools.ant.types.FileSet;
  -import org.apache.myrmidon.framework.PatternSet;
   
   /**
    * Chmod equivalent for unix-like environments.
  @@ -64,11 +64,8 @@
       /**
        * Sets the set of exclude patterns. Patterns may be separated by a comma or
        * a space.
  -     *
  -     * @param excludes the string containing the exclude patterns
        */
       public void setExcludes( String excludes )
  -        throws TaskException
       {
           m_defaultSetDefined = true;
           m_defaultSet.setExcludes( excludes );
  @@ -96,7 +93,6 @@
        * @param includes the string containing the include patterns
        */
       public void setIncludes( String includes )
  -        throws TaskException
       {
           m_defaultSetDefined = true;
           m_defaultSet.setIncludes( includes );
  @@ -127,7 +123,6 @@
        * add a name entry on the include list
        */
       public void addInclude( final Pattern pattern )
  -        throws TaskException
       {
           m_defaultSetDefined = true;
           m_defaultSet.addInclude( pattern );
  @@ -135,13 +130,11 @@
   
       /**
        * add a set of patterns
  -     *
        */
  -    public PatternSet createPatternSet()
  -        throws TaskException
  +    public void addPatternSet( final PatternSet set )
       {
           m_defaultSetDefined = true;
  -        return m_defaultSet.createPatternSet();
  +        m_defaultSet.addPatternSet( set );
       }
   
       public void execute()
  @@ -154,8 +147,10 @@
           else if( isValidOs() )
           {
               // we are chmodding the given directory
  -            addArg( new Argument( m_defaultSet.getDir().getPath() ) );
  -            Execute execute = prepareExec();
  +            final Argument argument =
  +                new Argument( m_defaultSet.getDir().getPath() );
  +            addArg( argument );
  +            final Execute execute = prepareExec();
               try
               {
                   execute.setCommandline( getCommand().getCommandline() );
  
  
  

--
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