ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb WeblogicDeploymentTool.java
Date Tue, 04 Jun 2002 07:11:23 GMT
conor       2002/06/04 00:11:23

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/ejb Tag:
                        ANT_15_BRANCH WeblogicDeploymentTool.java
  Log:
  Only use -classpath if a weblogic classpath is provided.
  Allow weblogic.home to be passed as a system property
  
  PR:	9578, 5094
  Submitted by:	bruce@callenish.com (Bruce Atherton)
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.40.2.2  +22 -1     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.40.2.1
  retrieving revision 1.40.2.2
  diff -u -w -u -r1.40.2.1 -r1.40.2.2
  --- WeblogicDeploymentTool.java	30 May 2002 13:22:49 -0000	1.40.2.1
  +++ WeblogicDeploymentTool.java	4 Jun 2002 07:11:23 -0000	1.40.2.2
  @@ -64,6 +64,7 @@
   import java.util.Hashtable;
   import java.util.Iterator;
   import java.util.Enumeration;
  +import java.util.Vector;
   
   import javax.xml.parsers.SAXParserFactory;
   import javax.xml.parsers.SAXParser;
  @@ -74,6 +75,7 @@
   import org.apache.tools.ant.AntClassLoader;
   import org.apache.tools.ant.types.Path;
   import org.apache.tools.ant.taskdefs.Java;
  +import org.apache.tools.ant.types.Environment;
   import org.apache.tools.ant.util.FileUtils;
   
   public class WeblogicDeploymentTool extends GenericDeploymentTool {
  @@ -147,6 +149,9 @@
       /** The classpath to the weblogic classes. */
       private Path wlClasspath = null;
   
  +    /** System properties for the JVM. */
  +    private Vector sysprops = new Vector();
  +
       /**
        * The weblogic.StdoutSeverityLevel to use when running the JVM that
        * executes ejbc. Set to 16 to avoid the warnings about EJB Home and
  @@ -158,6 +163,14 @@
       private FileUtils fileUtils = FileUtils.newFileUtils();
   
   
  +    /**
  +     * Add a nested sysproperty element.
  +     */
  +    public void addSysproperty(Environment.Variable sysp) {
  +        sysprops.add(sysp);
  +    }
  +
  +
       /** Get the classpath to the weblogic classpaths  */
       public Path createWLClasspath() {
           if (wlClasspath == null) {
  @@ -456,6 +469,14 @@
               javaTask = (Java) getTask().getProject().createTask("java");
               javaTask.setTaskName("ejbc");
   
  +            if (!(sysprops.isEmpty())) {
  +                for (Enumeration en = sysprops.elements() ; en.hasMoreElements();) {
  +                    Environment.Variable entry 
  +                        = (Environment.Variable) en.nextElement();
  +                    javaTask.addSysproperty(entry);
  +                }
  +            }
  +
               if (getJvmDebugLevel() != null) {
                   javaTask.createJvmarg().setLine(" -Dweblogic.StdoutSeverityLevel=" + jvmDebugLevel);
               }
  @@ -494,7 +515,7 @@
               }
   
               Path combinedClasspath = getCombinedClasspath();
  -            if (combinedClasspath != null
  +            if (wlClasspath != null && combinedClasspath != null
                    && combinedClasspath.toString().trim().length() > 0) {
                   javaTask.createArg().setValue("-classpath");
                   javaTask.createArg().setPath(combinedClasspath);
  
  
  

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