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/optional/junit JUnitTask.java
Date Sun, 20 Jan 2002 09:58:35 GMT
donaldp     02/01/20 01:58:35

  Modified:    proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/depend
                        Depend.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet
                        CSharp.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb
                        GenericDeploymentTool.java
                        WeblogicDeploymentTool.java
                        WebsphereDeploymentTool.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc
                        JJTree.java JavaCC.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit
                        JUnitTask.java
  Log:
  Moved some path manipulation utilities into PathUtils
  
  Revision  Changes    Path
  1.15      +3 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
  
  Index: Depend.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Depend.java	15 Jan 2002 09:51:08 -0000	1.14
  +++ Depend.java	20 Jan 2002 09:58:34 -0000	1.15
  @@ -24,6 +24,7 @@
   import org.apache.tools.ant.types.DirectoryScanner;
   import org.apache.tools.ant.taskdefs.MatchingTask;
   import org.apache.tools.ant.types.Path;
  +import org.apache.tools.ant.types.PathUtil;
   
   /**
    * Generate a dependency file for a given set of classes
  @@ -570,7 +571,8 @@
           {
               // now determine which jars each class depends upon
               classpathDependencies = new Hashtable();
  -            final ClassLoader classLoader = new URLClassLoader( dependClasspath.toURLs()
);
  +            final URL[] urls = PathUtil.toURLs( dependClasspath );
  +            final ClassLoader classLoader = new URLClassLoader( urls );
   
               Hashtable classpathFileCache = new Hashtable();
               Object nullFileMarker = new Object();
  
  
  
  1.12      +4 -5      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
  
  Index: CSharp.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- CSharp.java	12 Jan 2002 23:51:07 -0000	1.11
  +++ CSharp.java	20 Jan 2002 09:58:35 -0000	1.12
  @@ -11,6 +11,7 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.types.DirectoryScanner;
   import org.apache.tools.ant.types.Path;
  +import org.apache.tools.ant.taskdefs.MatchingTask;
   
   // ====================================================================
   
  @@ -93,9 +94,8 @@
    * @version 0.3
    */
   public class CSharp
  -    extends org.apache.tools.ant.taskdefs.MatchingTask
  +    extends MatchingTask
   {
  -
       /**
        * name of the executable. the .exe suffix is deliberately not included in
        * anticipation of the unix version
  @@ -958,6 +958,5 @@
       protected boolean notEmpty( String s )
       {
           return s != null && s.length() != 0;
  -    }// end execute
  -
  -}//end class
  +    }
  +}
  
  
  
  1.15      +4 -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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- GenericDeploymentTool.java	15 Jan 2002 09:51:08 -0000	1.14
  +++ GenericDeploymentTool.java	20 Jan 2002 09:58:35 -0000	1.15
  @@ -13,6 +13,7 @@
   import java.io.IOException;
   import java.io.InputStream;
   import java.net.URLClassLoader;
  +import java.net.URL;
   import java.util.ArrayList;
   import java.util.HashSet;
   import java.util.Hashtable;
  @@ -33,6 +34,7 @@
   import org.apache.tools.ant.Task;
   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.util.depend.Dependencies;
   import org.apache.tools.ant.util.depend.Filter;
   import org.xml.sax.InputSource;
  @@ -332,7 +334,8 @@
           }
           else
           {
  -            classpathLoader = new URLClassLoader( combinedClasspath.toURLs() );
  +            final URL[] urls = PathUtil.toURLs( combinedClasspath );
  +            classpathLoader = new URLClassLoader( urls );
           }
   
           return classpathLoader;
  
  
  
  1.15      +4 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
  
  Index: WeblogicDeploymentTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- WeblogicDeploymentTool.java	15 Jan 2002 09:51:08 -0000	1.14
  +++ WeblogicDeploymentTool.java	20 Jan 2002 09:58:35 -0000	1.15
  @@ -13,6 +13,7 @@
   import java.io.IOException;
   import java.io.InputStream;
   import java.net.URLClassLoader;
  +import java.net.URL;
   import java.util.Hashtable;
   import java.util.Iterator;
   import java.util.jar.JarEntry;
  @@ -24,6 +25,7 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.taskdefs.Java;
   import org.apache.tools.ant.types.Path;
  +import org.apache.tools.ant.types.PathUtil;
   import org.xml.sax.InputSource;
   
   public class WeblogicDeploymentTool extends GenericDeploymentTool
  @@ -335,7 +337,8 @@
               lookupPath.append( classpath );
           }
   
  -        return new URLClassLoader( lookupPath.toURLs() );
  +        final URL[] urls = PathUtil.toURLs( lookupPath );
  +        return new URLClassLoader( urls );
       }
   
       protected DescriptorHandler getWeblogicDescriptorHandler( final File srcDir )
  
  
  
  1.15      +4 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
  
  Index: WebsphereDeploymentTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- WebsphereDeploymentTool.java	15 Jan 2002 09:51:08 -0000	1.14
  +++ WebsphereDeploymentTool.java	20 Jan 2002 09:58:35 -0000	1.15
  @@ -12,6 +12,7 @@
   import java.io.IOException;
   import java.io.InputStream;
   import java.net.URLClassLoader;
  +import java.net.URL;
   import java.util.Hashtable;
   import java.util.Iterator;
   import java.util.jar.JarEntry;
  @@ -23,6 +24,7 @@
   import org.apache.tools.ant.types.EnumeratedAttribute;
   import org.apache.tools.ant.types.EnvironmentVariable;
   import org.apache.tools.ant.types.Path;
  +import org.apache.tools.ant.types.PathUtil;
   
   /**
    * Websphere deployment tool that augments the ejbjar task.
  @@ -413,7 +415,8 @@
           {
               lookupPath.append( classpath );
           }
  -        return new URLClassLoader( lookupPath.toURLs() );
  +        final URL[] urls = PathUtil.toURLs( lookupPath );
  +        return new URLClassLoader( urls );
       }
   
       protected DescriptorHandler getDescriptorHandler( File srcDir )
  
  
  
  1.20      +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
  
  Index: JJTree.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- JJTree.java	20 Jan 2002 02:11:43 -0000	1.19
  +++ JJTree.java	20 Jan 2002 09:58:35 -0000	1.20
  @@ -17,6 +17,7 @@
   import org.apache.tools.ant.types.Argument;
   import org.apache.tools.ant.types.CommandlineJava;
   import org.apache.tools.ant.types.Path;
  +import org.apache.tools.ant.types.PathUtil;
   
   /**
    * Taskdef for the JJTree compiler compiler.
  @@ -174,7 +175,7 @@
           }
           final Path classpath = cmdl.createClasspath();
           classpath.addLocation( new File( javaccHome, "JavaCC.zip" ) );
  -        classpath.addJavaRuntime();
  +        PathUtil.addJavaRuntime( classpath );
   
           cmdl.addVmArgument( "-mx140M" );
           cmdl.addVmArgument( "-Dinstall.root=" + javaccHome.getAbsolutePath() );
  
  
  
  1.15      +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
  
  Index: JavaCC.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- JavaCC.java	20 Jan 2002 02:11:43 -0000	1.14
  +++ JavaCC.java	20 Jan 2002 09:58:35 -0000	1.15
  @@ -18,6 +18,7 @@
   import org.apache.tools.ant.types.Commandline;
   import org.apache.tools.ant.types.CommandlineJava;
   import org.apache.tools.ant.types.Path;
  +import org.apache.tools.ant.types.PathUtil;
   import org.apache.avalon.excalibur.util.StringUtil;
   
   /**
  @@ -228,7 +229,7 @@
           }
           final Path classpath = cmdl.createClasspath();
           classpath.addLocation( new File( javaccHome, "JavaCC.zip" ) );
  -        classpath.addJavaRuntime();
  +        PathUtil.addJavaRuntime( classpath );
   
           cmdl.addVmArgument( "-mx140M" );
           cmdl.addVmArgument( "-Dinstall.root=" + javaccHome.getAbsolutePath() );
  
  
  
  1.29      +3 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
  
  Index: JUnitTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- JUnitTask.java	20 Jan 2002 02:11:44 -0000	1.28
  +++ JUnitTask.java	20 Jan 2002 09:58:35 -0000	1.29
  @@ -29,6 +29,7 @@
   import org.apache.tools.ant.types.EnvironmentVariable;
   import org.apache.tools.ant.types.Path;
   import org.apache.tools.ant.types.SysProperties;
  +import org.apache.tools.ant.types.PathUtil;
   
   /**
    * Ant task to run JUnit tests. <p>
  @@ -696,7 +697,8 @@
               if( classpath != null )
               {
                   getLogger().debug( "Using CLASSPATH " + classpath );
  -                classLoader = new URLClassLoader( classpath.toURLs() );
  +                final URL[] urls = PathUtil.toURLs( classpath );
  +                classLoader = new URLClassLoader( urls );
               }
               runner = new JUnitTestRunner( test,
                                             test.getHaltonerror(),
  
  
  

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