ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb WeblogicDeploymentTool.java
Date Mon, 13 Nov 2000 00:29:52 GMT
conor       00/11/12 16:29:52

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/ejb
                        WeblogicDeploymentTool.java
  Log:
  Ensure the bean classes can be loaded by appending the classpath,
  if specified.
  
  Revision  Changes    Path
  1.7       +11 -11    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
  
  Index: WeblogicDeploymentTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- WeblogicDeploymentTool.java	2000/11/11 15:11:41	1.6
  +++ WeblogicDeploymentTool.java	2000/11/13 00:29:52	1.7
  @@ -59,11 +59,8 @@
   import java.util.*;
   import java.net.*;
   
  -import org.apache.tools.ant.BuildException;
  -import org.apache.tools.ant.Project;
  -import org.apache.tools.ant.Task;
  -import org.apache.tools.ant.types.Path;
  -import org.apache.tools.ant.types.Commandline;
  +import org.apache.tools.ant.*;
  +import org.apache.tools.ant.types.*;
   import org.apache.tools.ant.taskdefs.Java;
   
   public class WeblogicDeploymentTool extends GenericDeploymentTool {
  @@ -489,11 +486,14 @@
       */
       protected ClassLoader getClassLoaderFromJar(File classjar) throws IOException
       {
  -        URLClassLoader loader;
  -        URL[] aURL = new URL[1];
  -
  -        aURL[0] = new URL("file","",0,classjar.getAbsolutePath());
  -        loader = new URLClassLoader(aURL);
  -        return loader;
  +        Path lookupPath = new Path(getTask().getProject());
  +        lookupPath.setLocation(classjar);
  +        
  +        Path classpath = getClasspath();
  +        if (classpath != null) {
  +            lookupPath.append(classpath);
  +        }
  +        
  +        return new AntClassLoader(getTask().getProject(), lookupPath);
       }
   }
  
  
  

Mime
View raw message