ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adammurd...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon/framework/file/test PathTestCase.java TestFileList.java path.ant
Date Fri, 22 Mar 2002 04:12:37 GMT
adammurdoch    02/03/21 20:12:37

  Modified:    proposal/myrmidon build.xml
               proposal/myrmidon/src/java/org/apache/antlib/core
                        AbstractAvailableCondition.java
               proposal/myrmidon/src/java/org/apache/antlib/dotnet
                        CSharp.java
               proposal/myrmidon/src/java/org/apache/antlib/java
                        JavaTask.java
               proposal/myrmidon/src/java/org/apache/antlib/xml
                        XMLValidateTask.java XSLTProcess.java
               proposal/myrmidon/src/java/org/apache/myrmidon/framework
                        FileSet.java Pattern.java
               proposal/myrmidon/src/java/org/apache/myrmidon/framework/file
                        FileList.java Path.java
               proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs
                        ANTLR.java IContract.java Javah.java
                        PathConvert.java Property.java SQLExec.java
               proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac
                        DefaultCompilerAdapter.java Gcj.java Javac.java
                        Jikes.java Jvc.java Kjc.java
               proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javadoc
                        DocletInfo.java Javadoc.java
               proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/jdepend
                        JDependTask.java
               proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/jsp
                        JspC.java WLJspc.java
               proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/junit
                        JUnitTask.java
               proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/metamata
                        AbstractMetamataTask.java MAudit.java MMetrics.java
                        MParse.java
               proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic
                        DefaultRmicAdapter.java Rmic.java
               proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/sitraka
                        CovReport.java Coverage.java
  Added:       proposal/myrmidon/src/java/org/apache/antlib/file
                        ListPathTask.java
               proposal/myrmidon/src/testcases/org/apache/myrmidon/framework/file/test
                        PathTestCase.java TestFileList.java path.ant
  Removed:     proposal/myrmidon/src/testcases/org/apache/antlib/core/test
                        ant-descriptor.xml
  Log:
  * Changed Path.addPath( Path ) -> Path.add( FileList ), so that <path>
    can accept any nested FileList implementation, including <path>.
  
  * Added <list-path> diagnostic task.
  
  * Added test cases for <path>.
  
  Revision  Changes    Path
  1.85      +10 -2     jakarta-ant/proposal/myrmidon/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/build.xml,v
  retrieving revision 1.84
  retrieving revision 1.85
  diff -u -r1.84 -r1.85
  --- build.xml	21 Mar 2002 08:03:54 -0000	1.84
  +++ build.xml	22 Mar 2002 04:12:35 -0000	1.85
  @@ -568,8 +568,16 @@
           </jar>
   
           <!-- Prepare the project tests -->
  -        <copy file="${test.working.dir}/org/apache/antlib/core/test/ant-descriptor.xml"
  -            tofile="${test.classes}/META-INF/ant-descriptor.xml"/>
  +        <antlib-descriptor libName="unittests"
  +                           destdir="${gen.dir}"
  +                           classpathref="project.class.path">
  +            <fileset dir="src/testcases">
  +                <include name="org/apache/antlib/**"/>
  +                <include name="org/apache/myrmidon/framework/**"/>
  +            </fileset>
  +        </antlib-descriptor>
  +        <copy file="${gen.dir}/unittests-ant-descriptor.xml"
  +              tofile="${test.classes}/META-INF/ant-descriptor.xml"/>
   
           <!-- Run all the tests -->
           <junit printsummary="on" fork="true" failureProperty="test.failed">
  
  
  
  1.4       +2 -2      jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/core/AbstractAvailableCondition.java
  
  Index: AbstractAvailableCondition.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/core/AbstractAvailableCondition.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AbstractAvailableCondition.java	21 Mar 2002 08:03:54 -0000	1.3
  +++ AbstractAvailableCondition.java	22 Mar 2002 04:12:35 -0000	1.4
  @@ -20,7 +20,7 @@
    * resource in a classpath.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.3 $ $Date: 2002/03/21 08:03:54 $
  + * @version $Revision: 1.4 $ $Date: 2002/03/22 04:12:35 $
    */
   public abstract class AbstractAvailableCondition
       implements Condition
  @@ -33,7 +33,7 @@
       public void addClasspath( final Path classpath )
           throws TaskException
       {
  -        m_classpath.addPath( classpath );
  +        m_classpath.add( classpath );
       }
   
       /**
  
  
  
  1.9       +1 -1      jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/dotnet/CSharp.java
  
  Index: CSharp.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/dotnet/CSharp.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- CSharp.java	21 Mar 2002 08:03:54 -0000	1.8
  +++ CSharp.java	22 Mar 2002 04:12:35 -0000	1.9
  @@ -396,7 +396,7 @@
           {
               m_referenceFiles = new Path();
           }
  -        m_referenceFiles.addPath( path );
  +        m_referenceFiles.add( path );
       }
   
       /**
  
  
  
  1.1                  jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/file/ListPathTask.java
  
  Index: ListPathTask.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included  with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.antlib.file;
  
  import org.apache.myrmidon.api.AbstractTask;
  import org.apache.myrmidon.api.TaskException;
  import org.apache.myrmidon.framework.file.FileList;
  import org.apache.myrmidon.framework.file.Path;
  
  /**
   * A diagnostic task that lists the contents of a path.
   *
   * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
   * @version $Revision: 1.1 $ $Date: 2002/03/22 04:12:35 $
   *
   * @ant:task name="list-path"
   */
  public class ListPathTask
      extends AbstractTask
  {
      private final Path m_path = new Path();
  
      /**
       * Adds a nested path.
       */
      public void add( final FileList list )
      {
          m_path.add( list );
      }
  
      /**
       * Executes the task.
       */
      public void execute()
          throws TaskException
      {
          final String[] files = m_path.listFiles( getContext() );
          for( int i = 0; i < files.length; i++ )
          {
              final String file = files[ i ];
              getContext().warn( file );
          }
      }
  }
  
  
  
  1.2       +1 -1      jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/java/JavaTask.java
  
  Index: JavaTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/java/JavaTask.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JavaTask.java	21 Mar 2002 08:03:54 -0000	1.1
  +++ JavaTask.java	22 Mar 2002 04:12:35 -0000	1.2
  @@ -44,7 +44,7 @@
       public void addClasspath( final Path classpath )
           throws TaskException
       {
  -        m_exec.getClassPath().addPath( classpath );
  +        m_exec.getClassPath().add( classpath );
       }
   
       /**
  
  
  
  1.25      +2 -2      jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/xml/XMLValidateTask.java
  
  Index: XMLValidateTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/xml/XMLValidateTask.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- XMLValidateTask.java	21 Mar 2002 08:03:54 -0000	1.24
  +++ XMLValidateTask.java	22 Mar 2002 04:12:36 -0000	1.25
  @@ -109,7 +109,7 @@
           }
           else
           {
  -            m_classpath.addPath( classpath );
  +            m_classpath.add( classpath );
           }
       }
   
  @@ -170,7 +170,7 @@
           }
           Path path1 = m_classpath;
           final Path path = new Path();
  -        path1.addPath( path );
  +        path1.add( path );
           return path;
       }
   
  
  
  
  1.22      +1 -1      jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/xml/XSLTProcess.java
  
  Index: XSLTProcess.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/xml/XSLTProcess.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- XSLTProcess.java	21 Mar 2002 08:03:54 -0000	1.21
  +++ XSLTProcess.java	22 Mar 2002 04:12:36 -0000	1.22
  @@ -142,7 +142,7 @@
           {
               m_classpath = new Path();
           }
  -        m_classpath.addPath( path );
  +        m_classpath.add( path );
       }
   
       public void addParam( final XSLTParam param )
  
  
  
  1.2       +3 -1      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/FileSet.java
  
  Index: FileSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/FileSet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileSet.java	27 Jan 2002 09:37:06 -0000	1.1
  +++ FileSet.java	22 Mar 2002 04:12:36 -0000	1.2
  @@ -14,7 +14,9 @@
    * specified root.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.1 $ $Date: 2002/01/27 09:37:06 $
  + * @version $Revision: 1.2 $ $Date: 2002/03/22 04:12:36 $
  + *
  + * @ant:data-type name="fileset"
    */
   public class FileSet
       extends AbstractFileSet
  
  
  
  1.20      +3 -2      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/Pattern.java
  
  Index: Pattern.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/Pattern.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- Pattern.java	18 Mar 2002 09:15:10 -0000	1.19
  +++ Pattern.java	22 Mar 2002 04:12:36 -0000	1.20
  @@ -19,7 +19,7 @@
    * Basic data type for holding patterns.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.19 $ $Date: 2002/03/18 09:15:10 $
  + * @version $Revision: 1.20 $ $Date: 2002/03/22 04:12:36 $
    * @ant:data-type name="pattern"
    */
   public class Pattern
  @@ -100,7 +100,8 @@
       {
           try
           {
  -            final boolean result = getCondition().evaluate( context );
  +            final Condition condition = getCondition();
  +            final boolean result = ( condition == null || condition.evaluate( context ) );
               if( result )
               {
                   return getName();
  
  
  
  1.2       +3 -1      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/file/FileList.java
  
  Index: FileList.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/file/FileList.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileList.java	21 Mar 2002 08:03:54 -0000	1.1
  +++ FileList.java	22 Mar 2002 04:12:36 -0000	1.2
  @@ -14,7 +14,9 @@
    * A list of files.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/03/21 08:03:54 $
  + * @version $Revision: 1.2 $ $Date: 2002/03/22 04:12:36 $
  + *
  + * @ant:role shorthand="path"
    */
   public interface FileList
   {
  
  
  
  1.2       +7 -7      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/file/Path.java
  
  Index: Path.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/file/Path.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Path.java	21 Mar 2002 08:03:54 -0000	1.1
  +++ Path.java	22 Mar 2002 04:12:36 -0000	1.2
  @@ -59,7 +59,7 @@
   
       public Path( final String path )
       {
  -        addPath( path );
  +        add( path );
       }
   
       public Path()
  @@ -110,13 +110,13 @@
        */
       public void setPath( final String path )
       {
  -        addPath( path );
  +        add( path );
       }
   
       /**
        * Adds a path.
        */
  -    public void addPath( final String path )
  +    public void add( final String path )
       {
           final FileList pathElement = new ParsedPathElement( path );
           m_elements.add( pathElement );
  @@ -125,18 +125,18 @@
       /**
        * Adds a path.
        */
  -    public void addPath( final String[] path )
  +    public void add( final String[] path )
       {
           final FileList pathElement = new ArrayFileList( path );
           m_elements.add( pathElement );
       }
   
       /**
  -     * Creates a nested <code>&lt;path&gt;</code> element.
  +     * Adds a path.
        */
  -    public void addPath( final Path path )
  +    public void add( final FileList list )
       {
  -        m_elements.add( path );
  +        m_elements.add( list );
       }
   
       /**
  
  
  
  1.7       +1 -1      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/ANTLR.java
  
  Index: ANTLR.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/ANTLR.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ANTLR.java	21 Mar 2002 08:03:55 -0000	1.6
  +++ ANTLR.java	22 Mar 2002 04:12:36 -0000	1.7
  @@ -69,7 +69,7 @@
        */
       public void addClasspath( final Path path )
       {
  -        m_exe.getClassPath().addPath( path );
  +        m_exe.getClassPath().add( path );
       }
   
       /**
  
  
  
  1.7       +5 -5      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/IContract.java
  
  Index: IContract.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/IContract.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- IContract.java	21 Mar 2002 08:03:55 -0000	1.6
  +++ IContract.java	22 Mar 2002 04:12:36 -0000	1.7
  @@ -488,7 +488,7 @@
        */
       public void setClasspath( final Path path )
       {
  -        createClasspath().addPath( path );
  +        createClasspath().add( path );
       }
   
       /**
  @@ -709,12 +709,12 @@
   
               // Create the classpath required to compile the sourcefiles BEFORE instrumentation
               Path beforeInstrumentationClasspath = new Path();
  -            beforeInstrumentationClasspath.addPath( baseClasspath );
  +            beforeInstrumentationClasspath.add( baseClasspath );
               beforeInstrumentationClasspath.addLocation( srcDir );
   
               // Create the classpath required to compile the sourcefiles AFTER instrumentation
               Path afterInstrumentationClasspath = new Path();
  -            afterInstrumentationClasspath.addPath( baseClasspath );
  +            afterInstrumentationClasspath.add( baseClasspath );
               afterInstrumentationClasspath.addLocation( instrumentDir );
               afterInstrumentationClasspath.addLocation( repositoryDir );
               afterInstrumentationClasspath.addLocation( srcDir );
  @@ -722,7 +722,7 @@
   
               // Create the classpath required to automatically compile the repository files
               Path repositoryClasspath = new Path();
  -            repositoryClasspath.addPath( baseClasspath );
  +            repositoryClasspath.add( baseClasspath );
               repositoryClasspath.addLocation( instrumentDir );
               repositoryClasspath.addLocation( srcDir );
               repositoryClasspath.addLocation( repositoryDir );
  @@ -730,7 +730,7 @@
   
               // Create the classpath required for iContract itself
               Path iContractClasspath = new Path();
  -            iContractClasspath.addPath( baseClasspath );
  +            iContractClasspath.add( baseClasspath );
               iContractClasspath.addLocation( new File(System.getProperty( "java.home" ) + File.separator + ".." + File.separator + "lib" + File.separator + "tools.jar" ) );
               iContractClasspath.addLocation( srcDir );
               iContractClasspath.addLocation( repositoryDir );
  
  
  
  1.5       +2 -2      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/Javah.java
  
  Index: Javah.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/Javah.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Javah.java	21 Mar 2002 08:03:55 -0000	1.4
  +++ Javah.java	22 Mar 2002 04:12:36 -0000	1.5
  @@ -79,7 +79,7 @@
           }
           else
           {
  -            m_bootclasspath.addPath( bootclasspath );
  +            m_bootclasspath.add( bootclasspath );
           }
       }
   
  @@ -100,7 +100,7 @@
           }
           else
           {
  -            m_classpath.addPath( classpath );
  +            m_classpath.add( classpath );
           }
       }
   
  
  
  
  1.4       +1 -1      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/PathConvert.java
  
  Index: PathConvert.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/PathConvert.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PathConvert.java	21 Mar 2002 08:03:55 -0000	1.3
  +++ PathConvert.java	22 Mar 2002 04:12:36 -0000	1.4
  @@ -108,7 +108,7 @@
           }
           else
           {
  -            m_path.addPath( path );
  +            m_path.add( path );
           }
       }
   
  
  
  
  1.4       +1 -1      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/Property.java
  
  Index: Property.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/Property.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Property.java	21 Mar 2002 08:03:55 -0000	1.3
  +++ Property.java	22 Mar 2002 04:12:36 -0000	1.4
  @@ -45,7 +45,7 @@
           }
           else
           {
  -            m_classpath.addPath( classpath );
  +            m_classpath.add( classpath );
           }
       }
   
  
  
  
  1.4       +1 -1      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/SQLExec.java
  
  Index: SQLExec.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/SQLExec.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SQLExec.java	21 Mar 2002 08:03:55 -0000	1.3
  +++ SQLExec.java	22 Mar 2002 04:12:36 -0000	1.4
  @@ -178,7 +178,7 @@
           }
           else
           {
  -            this.classpath.addPath( classpath );
  +            this.classpath.add( classpath );
           }
       }
   
  
  
  
  1.7       +1 -1      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/DefaultCompilerAdapter.java
  
  Index: DefaultCompilerAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/DefaultCompilerAdapter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DefaultCompilerAdapter.java	21 Mar 2002 08:03:55 -0000	1.6
  +++ DefaultCompilerAdapter.java	22 Mar 2002 04:12:36 -0000	1.7
  @@ -295,7 +295,7 @@
           // add the classpath
           if( m_compileClasspath != null )
           {
  -            classpath.addPath( m_compileClasspath );
  +            classpath.add( m_compileClasspath );
           }
       }
   
  
  
  
  1.5       +2 -2      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Gcj.java
  
  Index: Gcj.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Gcj.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Gcj.java	21 Mar 2002 08:03:55 -0000	1.4
  +++ Gcj.java	22 Mar 2002 04:12:36 -0000	1.5
  @@ -50,7 +50,7 @@
           // gcj doesn't support bootclasspath dir (-bootclasspath)
           // so we'll emulate it for compatibility and convenience.
           final String[] bootclasspath = m_bootclasspath.listFiles( getTaskContext() );
  -        classpath.addPath( bootclasspath );
  +        classpath.add( bootclasspath );
   
           // gcj doesn't support an extension dir (-extdir)
           // so we'll emulate it for compatibility and convenience.
  @@ -66,7 +66,7 @@
   
           // Gcj has no option for source-path so we
           // will add it to classpath.
  -        classpath.addPath( src );
  +        classpath.add( src );
   
           cmd.setExecutable( "gcj" );
   
  
  
  
  1.4       +4 -4      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Javac.java
  
  Index: Javac.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Javac.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Javac.java	21 Mar 2002 08:03:55 -0000	1.3
  +++ Javac.java	22 Mar 2002 04:12:36 -0000	1.4
  @@ -89,7 +89,7 @@
        */
       public void addBootclasspath( final Path bootclasspath )
       {
  -        m_bootclasspath.addPath( bootclasspath );
  +        m_bootclasspath.add( bootclasspath );
       }
   
       /**
  @@ -103,7 +103,7 @@
           }
           else
           {
  -            m_compileClasspath.addPath( classpath );
  +            m_compileClasspath.add( classpath );
           }
       }
   
  @@ -181,7 +181,7 @@
           }
           else
           {
  -            m_extdirs.addPath( extdirs );
  +            m_extdirs.add( extdirs );
           }
       }
   
  @@ -282,7 +282,7 @@
           }
           else
           {
  -            m_src.addPath( srcDir );
  +            m_src.add( srcDir );
           }
       }
   
  
  
  
  1.5       +3 -3      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Jikes.java
  
  Index: Jikes.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Jikes.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Jikes.java	21 Mar 2002 08:03:55 -0000	1.4
  +++ Jikes.java	22 Mar 2002 04:12:36 -0000	1.5
  @@ -47,7 +47,7 @@
           // Jikes doesn't support bootclasspath dir (-bootclasspath)
           // so we'll emulate it for compatibility and convenience.
           final String[] bootclasspath = m_bootclasspath.listFiles( getTaskContext() );
  -        classpath.addPath( bootclasspath );
  +        classpath.add( bootclasspath );
   
           // Jikes doesn't support an extension dir (-extdir)
           // so we'll emulate it for compatibility and convenience.
  @@ -67,13 +67,13 @@
   
           // Jikes has no option for source-path so we
           // will add it to classpath.
  -        classpath.addPath( src );
  +        classpath.add( src );
   
           // if the user has set JIKESPATH we should add the contents as well
           String jikesPath = System.getProperty( "jikes.class.path" );
           if( jikesPath != null )
           {
  -            classpath.addPath( jikesPath );
  +            classpath.add( jikesPath );
           }
   
           Commandline cmd = new Commandline();
  
  
  
  1.5       +2 -2      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Jvc.java
  
  Index: Jvc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Jvc.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Jvc.java	21 Mar 2002 08:03:55 -0000	1.4
  +++ Jvc.java	22 Mar 2002 04:12:36 -0000	1.5
  @@ -35,7 +35,7 @@
           // jvc doesn't support bootclasspath dir (-bootclasspath)
           // so we'll emulate it for compatibility and convenience.
           final String[] bootclasspath = m_bootclasspath.listFiles( getTaskContext() );
  -        classpath.addPath( bootclasspath );
  +        classpath.add( bootclasspath );
   
           // jvc doesn't support an extension dir (-extdir)
           // so we'll emulate it for compatibility and convenience.
  @@ -55,7 +55,7 @@
   
           // jvc has no option for source-path so we
           // will add it to classpath.
  -        classpath.addPath( src );
  +        classpath.add( src );
   
           Commandline cmd = new Commandline();
           cmd.setExecutable( "jvc" );
  
  
  
  1.5       +3 -3      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Kjc.java
  
  Index: Kjc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Kjc.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Kjc.java	21 Mar 2002 08:03:55 -0000	1.4
  +++ Kjc.java	22 Mar 2002 04:12:36 -0000	1.5
  @@ -89,15 +89,15 @@
           Path cp = new Path();
   
           // kjc don't have bootclasspath option.
  -        cp.addPath( m_bootclasspath );
  +        cp.add( m_bootclasspath );
   
           if( m_extdirs != null )
           {
               addExtdirs( cp );
           }
   
  -        cp.addPath( classpath );
  -        cp.addPath( src );
  +        cp.add( classpath );
  +        cp.add( src );
   
           cmd.addArgument( PathUtil.formatPath( cp, getTaskContext() ) );
   
  
  
  
  1.4       +2 -2      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javadoc/DocletInfo.java
  
  Index: DocletInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javadoc/DocletInfo.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DocletInfo.java	21 Mar 2002 08:03:55 -0000	1.3
  +++ DocletInfo.java	22 Mar 2002 04:12:36 -0000	1.4
  @@ -32,7 +32,7 @@
           }
           else
           {
  -            m_path.addPath( path );
  +            m_path.add( path );
           }
       }
   
  @@ -67,7 +67,7 @@
           }
           Path path1 = m_path;
           final Path path = new Path();
  -        path1.addPath( path );
  +        path1.add( path );
           return path;
       }
   }
  
  
  
  1.7       +8 -8      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javadoc/Javadoc.java
  
  Index: Javadoc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javadoc/Javadoc.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Javadoc.java	21 Mar 2002 08:03:55 -0000	1.6
  +++ Javadoc.java	22 Mar 2002 04:12:36 -0000	1.7
  @@ -114,7 +114,7 @@
           }
           else
           {
  -            m_bootclasspath.addPath( src );
  +            m_bootclasspath.add( src );
           }
       }
   
  @@ -139,7 +139,7 @@
           }
           else
           {
  -            m_classpath.addPath( src );
  +            m_classpath.add( src );
           }
       }
   
  @@ -384,7 +384,7 @@
           }
           else
           {
  -            m_sourcePath.addPath( src );
  +            m_sourcePath.add( src );
           }
       }
   
  @@ -475,7 +475,7 @@
           }
           Path path1 = m_bootclasspath;
           final Path path = new Path();
  -        path1.addPath( path );
  +        path1.add( path );
           return path;
       }
   
  @@ -488,7 +488,7 @@
           }
           Path path1 = m_classpath;
           final Path path = new Path();
  -        path1.addPath( path );
  +        path1.add( path );
           return path;
       }
   
  @@ -521,7 +521,7 @@
           }
           Path path1 = m_sourcePath;
           final Path path = new Path();
  -        path1.addPath( path );
  +        path1.add( path );
           return path;
       }
   
  @@ -564,10 +564,10 @@
   
           // Build the classpath to pass to Javadoc
           Path classpath = new Path();
  -        classpath.addPath( m_sourcePath );
  +        classpath.add( m_sourcePath );
           if( m_classpath != null )
           {
  -            classpath.addPath( m_classpath );
  +            classpath.add( m_classpath );
           }
           cmd.addArgument( "-classpath" );
           cmd.addArgument( PathUtil.formatPath( classpath, getContext() ) );
  
  
  
  1.8       +3 -3      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/jdepend/JDependTask.java
  
  Index: JDependTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/jdepend/JDependTask.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- JDependTask.java	21 Mar 2002 08:03:55 -0000	1.7
  +++ JDependTask.java	22 Mar 2002 04:12:36 -0000	1.8
  @@ -105,7 +105,7 @@
        */
       public void addClasspath( final Path path )
       {
  -        m_compileClasspath.addPath( path );
  +        m_compileClasspath.add( path );
       }
   
       /**
  @@ -119,7 +119,7 @@
           }
           Path path1 = m_sourcesPath;
           final Path path = new Path();
  -        path1.addPath( path );
  +        path1.add( path );
           return path;
       }
   
  @@ -169,7 +169,7 @@
               exe.setJvm( m_jvm );
           }
   
  -        exe.getClassPath().addPath( m_compileClasspath );
  +        exe.getClassPath().add( m_compileClasspath );
   
           if( m_outputFile != null )
           {
  
  
  
  1.5       +4 -4      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/jsp/JspC.java
  
  Index: JspC.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/jsp/JspC.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JspC.java	21 Mar 2002 08:03:56 -0000	1.4
  +++ JspC.java	22 Mar 2002 04:12:36 -0000	1.5
  @@ -56,7 +56,7 @@
    *      </a>
    * @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.4 $ $Date: 2002/03/21 08:03:56 $
  + * @version $Revision: 1.5 $ $Date: 2002/03/22 04:12:36 $
    */
   public class JspC extends MatchingTask
   {
  @@ -107,7 +107,7 @@
           }
           else
           {
  -            classpath.addPath( cp );
  +            classpath.add( cp );
           }
       }
   
  @@ -185,7 +185,7 @@
           }
           else
           {
  -            src.addPath( srcDir );
  +            src.add( srcDir );
           }
       }
   
  @@ -308,7 +308,7 @@
           }
           Path path1 = classpath;
           final Path path = new Path();
  -        path1.addPath( path );
  +        path1.add( path );
           return path;
       }
   
  
  
  
  1.8       +2 -2      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/jsp/WLJspc.java
  
  Index: WLJspc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/jsp/WLJspc.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- WLJspc.java	21 Mar 2002 08:03:56 -0000	1.7
  +++ WLJspc.java	22 Mar 2002 04:12:36 -0000	1.8
  @@ -82,7 +82,7 @@
           }
           else
           {
  -            compileClasspath.addPath( classpath );
  +            compileClasspath.add( classpath );
           }
       }
   
  @@ -219,7 +219,7 @@
               ExecuteJava helperTask = new ExecuteJava();
               helperTask.setClassName( "weblogic.jspc" );
               helperTask.getArguments().addArguments( args );
  -            helperTask.getClassPath().addPath( compileClasspath );
  +            helperTask.getClassPath().add( compileClasspath );
               helperTask.executeForked( getContext() );
           }
       }
  
  
  
  1.7       +2 -2      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/junit/JUnitTask.java
  
  Index: JUnitTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/junit/JUnitTask.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- JUnitTask.java	21 Mar 2002 08:03:56 -0000	1.6
  +++ JUnitTask.java	22 Mar 2002 04:12:37 -0000	1.7
  @@ -331,7 +331,7 @@
        */
       public void addClasspath( final Path path )
       {
  -        classPath.addPath( path );
  +        classPath.add( path );
       }
   
       /**
  @@ -567,7 +567,7 @@
           cmd.setIgnoreReturnCode( true );
           cmd.setWorkingDirectory( dir );
           cmd.setMaxMemory( maxMem );
  -        cmd.getClassPath().addPath( classPath );
  +        cmd.getClassPath().add( classPath );
           cmd.getVmArguments().addArguments( vmArgs );
           cmd.getSysProperties().addVariables( sysProperties );
   
  
  
  
  1.7       +2 -2      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/metamata/AbstractMetamataTask.java
  
  Index: AbstractMetamataTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/metamata/AbstractMetamataTask.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AbstractMetamataTask.java	21 Mar 2002 08:03:56 -0000	1.6
  +++ AbstractMetamataTask.java	22 Mar 2002 04:12:37 -0000	1.7
  @@ -128,7 +128,7 @@
        */
       public void addClasspath( final Path path )
       {
  -        m_exe.getClassPath().addPath( path );
  +        m_exe.getClassPath().add( path );
       }
   
       /**
  @@ -144,7 +144,7 @@
        */
       public void addSourcepath( final Path path )
       {
  -        m_sourcePath.addPath( path );
  +        m_sourcePath.add( path );
       }
   
       /**
  
  
  
  1.6       +2 -2      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/metamata/MAudit.java
  
  Index: MAudit.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/metamata/MAudit.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MAudit.java	21 Mar 2002 08:03:56 -0000	1.5
  +++ MAudit.java	22 Mar 2002 04:12:37 -0000	1.6
  @@ -124,10 +124,10 @@
           // there is a bug in Metamata 2.0 build 37. The sourcepath argument does
           // not work. So we will use the sourcepath prepended to classpath. (order
           // is important since Metamata looks at .class and .java)
  -        classpath.addPath( getSourcePath() );
  +        classpath.add( getSourcePath() );
   
           // don't forget to modify the pattern if you change the options reporting
  -        classpath.addPath( getClassPath() );
  +        classpath.add( getClassPath() );
   
           final String formattedClasspath = PathUtil.formatPath( classpath, getContext() );
           if( formattedClasspath.length() > 0 )
  
  
  
  1.6       +2 -2      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/metamata/MMetrics.java
  
  Index: MMetrics.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/metamata/MMetrics.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MMetrics.java	21 Mar 2002 08:03:56 -0000	1.5
  +++ MMetrics.java	22 Mar 2002 04:12:37 -0000	1.6
  @@ -127,10 +127,10 @@
           // there is a bug in Metamata 2.0 build 37. The sourcepath argument does
           // not work. So we will use the sourcepath prepended to classpath. (order
           // is important since Metamata looks at .class and .java)
  -        classpath.addPath( getSourcePath() );
  +        classpath.add( getSourcePath() );
   
           // don't forget to modify the pattern if you change the options reporting
  -        classpath.addPath( getClassPath() );
  +        classpath.add( getClassPath() );
   
           final String formattedClasspath = PathUtil.formatPath( classpath, getContext() );
           if( formattedClasspath.length() > 0 )
  
  
  
  1.8       +2 -2      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/metamata/MParse.java
  
  Index: MParse.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/metamata/MParse.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- MParse.java	21 Mar 2002 08:03:56 -0000	1.7
  +++ MParse.java	22 Mar 2002 04:12:37 -0000	1.8
  @@ -132,7 +132,7 @@
        */
       public void addClasspath( final Path path )
       {
  -        m_classpath.addPath( path );
  +        m_classpath.add( path );
       }
   
       /**
  @@ -148,7 +148,7 @@
        */
       public void addSourcepath( final Path path )
       {
  -        m_sourcepath.addPath( path );
  +        m_sourcepath.add( path );
       }
   
       /**
  
  
  
  1.5       +1 -1      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic/DefaultRmicAdapter.java
  
  Index: DefaultRmicAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic/DefaultRmicAdapter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefaultRmicAdapter.java	21 Mar 2002 08:03:56 -0000	1.4
  +++ DefaultRmicAdapter.java	22 Mar 2002 04:12:37 -0000	1.5
  @@ -195,7 +195,7 @@
           // add the classpath
           if( attributes.getClasspath() != null )
           {
  -            classpath.addPath( attributes.getClasspath() );
  +            classpath.add( attributes.getClasspath() );
           }
   
           return classpath;
  
  
  
  1.4       +2 -2      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic/Rmic.java
  
  Index: Rmic.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic/Rmic.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Rmic.java	21 Mar 2002 08:03:56 -0000	1.3
  +++ Rmic.java	22 Mar 2002 04:12:37 -0000	1.4
  @@ -116,7 +116,7 @@
           }
           else
           {
  -            compileClasspath.addPath( classpath );
  +            compileClasspath.add( classpath );
           }
       }
   
  @@ -145,7 +145,7 @@
           }
           else
           {
  -            this.extdirs.addPath( extdirs );
  +            this.extdirs.add( extdirs );
           }
       }
   
  
  
  
  1.6       +4 -4      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/sitraka/CovReport.java
  
  Index: CovReport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/sitraka/CovReport.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CovReport.java	21 Mar 2002 08:03:56 -0000	1.5
  +++ CovReport.java	22 Mar 2002 04:12:37 -0000	1.6
  @@ -206,7 +206,7 @@
           }
           Path path1 = coveragePath;
           final Path path = new Path();
  -        path1.addPath( path );
  +        path1.add( path );
           return path;
       }
   
  @@ -227,7 +227,7 @@
           }
           Path path1 = sourcePath;
           final Path path = new Path();
  -        path1.addPath( path );
  +        path1.add( path );
           return path;
       }
   
  @@ -292,7 +292,7 @@
               sourcePath = new Path();
               Path path1 = sourcePath;
               final Path path = new Path();
  -            path1.addPath( path );
  +            path1.add( path );
               path.setLocation( getBaseDirectory() );
           }
           v.add( "-sourcepath=" + sourcePath );
  @@ -368,7 +368,7 @@
               }
               Path path1 = classPath;
               final Path path = new Path();
  -            path1.addPath( path );
  +            path1.add( path );
               return path;
           }
   
  
  
  
  1.8       +1 -1      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/sitraka/Coverage.java
  
  Index: Coverage.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/sitraka/Coverage.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Coverage.java	21 Mar 2002 08:03:56 -0000	1.7
  +++ Coverage.java	22 Mar 2002 04:12:37 -0000	1.8
  @@ -184,7 +184,7 @@
        */
       public void setClasspath( final Path path )
       {
  -        m_classpath.addPath( path );
  +        m_classpath.add( path );
       }
   
       public Filters createFilters()
  
  
  
  1.1                  jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon/framework/file/test/PathTestCase.java
  
  Index: PathTestCase.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included  with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.myrmidon.framework.file.test;
  
  import java.io.File;
  import org.apache.avalon.excalibur.io.FileUtil;
  import org.apache.myrmidon.AbstractProjectTest;
  import org.apache.myrmidon.LogMessageTracker;
  
  /**
   * Test-cases for the <path> data type.
   *
   * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
   * @version $Revision: 1.1 $ $Date: 2002/03/22 04:12:37 $
   */
  public class PathTestCase
      extends AbstractProjectTest
  {
      public PathTestCase( final String name )
      {
          super( name );
      }
  
      /**
       * Tests setting the location attribute.
       */
      public void testLocationAttribute() throws Exception
      {
          testPathContent( "set-location", new String[] { "location" } );
      }
  
      /**
       * Tests setting the path attribute.
       */
      public void testPathAttribute() throws Exception
      {
          // Test a path with a single file
          testPathContent( "set-path", new String[] { "single-file" } );
  
          // Test a path with several files, using ; separator
          testPathContent( "set-multi-path", new String[] { "file1", "file2", ".." } );
  
          // Test a path with several files, using : separator
          testPathContent( "set-multi-path2", new String[] { "file1", "file2", ".." } );
      }
  
      /**
       * Test using nested <path> elements.
       */
      public void testPathElement() throws Exception
      {
          testPathContent( "nested-path", new String[] { "some-file" } );
          testPathContent( "mixed-path", new String[] { "file1", "file2", "file3", "file4", "file5" } );
      }
  
      /**
       * Test using nested <fileset> elements.
       */
      public void testFilesetElement() throws Exception
      {
          testPathContent( "set-fileset", new String[] { "path.ant" } );
      }
  
      /**
       * Test using a nested custom file list implementation.
       */
      public void testCustomFileList() throws Exception
      {
          testPathContent( "test-custom-file-list", new String[] { "file1" } );
      }
  
      /**
       * Executes a target, and asserts that a particular list of file names
       * is logged.
       */
      private void testPathContent( final String targetName,
                                    final String[] files ) throws Exception
      {
          final File projectFile = getTestResource( "path.ant" );
          final File baseDir = projectFile.getParentFile();
  
          // Add each of the expected file names
          final LogMessageTracker listener = new LogMessageTracker();
          for( int i = 0; i < files.length; i++ )
          {
              final String fileName = files[ i ];
              final File file = FileUtil.resolveFile( baseDir, fileName );
              listener.addExpectedMessage( targetName, file.getAbsolutePath() );
          }
  
          // Execute the target
          executeTarget( projectFile, targetName, listener );
      }
  }
  
  
  
  1.1                  jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon/framework/file/test/TestFileList.java
  
  Index: TestFileList.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included  with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.myrmidon.framework.file.test;
  
  import org.apache.myrmidon.framework.file.FileList;
  import org.apache.myrmidon.api.TaskContext;
  import org.apache.myrmidon.api.TaskException;
  import java.io.File;
  
  /**
   * A test FileList implementation.
   *
   * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
   * @version $Revision: 1.1 $ $Date: 2002/03/22 04:12:37 $
   *
   * @ant:type type="path" name="test-file-list"
   */
  public class TestFileList
      implements FileList
  {
      private String m_name;
  
      public void setName( final String name )
      {
          m_name = name;
      }
  
      /**
       * Returns the files in this list.
       */
      public String[] listFiles( final TaskContext context )
          throws TaskException
      {
          final File file = context.resolveFile( m_name );
          return new String[] { file.getAbsolutePath() };
      }
  }
  
  
  
  1.1                  jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon/framework/file/test/path.ant
  
  Index: path.ant
  ===================================================================
  <project version="2.0">
      <!-- Test setting the location attribute -->
      <target name="set-location">
          <list-path>
              <path location="location"/>
          </list-path>
      </target>
  
      <!-- Test setting the path attribute -->
      <target name="set-path">
          <list-path>
              <path path="single-file"/>
          </list-path>
      </target>
  
      <!-- Test setting the path attribute -->
      <target name="set-multi-path">
          <list-path>
              <path path="file1;file2;.."/>
          </list-path>
      </target>
  
      <!-- Test setting the path attribute -->
      <target name="set-multi-path2">
          <list-path>
              <path path="file1:file2:.."/>
          </list-path>
      </target>
  
      <!-- Test using a nested <path> element -->
      <target name="nested-path">
          <list-path>
              <path>
                  <path location="some-file"/>
              </path>
          </list-path>
      </target>
  
      <!-- Test using a mix of attributes and nested <path> elements -->
      <target name="mixed-path">
          <list-path>
              <path location="file1" path="file2;file3">
                  <path location="file4"/>
                  <path location="file5"/>
              </path>
          </list-path>
      </target>
  
      <!-- Test using a nested fileset -->
      <target name="set-fileset">
          <list-path>
              <path>
                  <fileset dir="." includes="**/path.ant"/>
              </path>
          </list-path>
      </target>
  
      <!-- Test using a custom file list implementation -->
      <target name="test-custom-file-list">
          <list-path>
              <path>
                  <test-file-list name="file1"/>
              </path>
          </list-path>
      </target>
  
  </project>
  
  

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