ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ste. Marie, Paul" <SteMa...@digineer.com>
Subject [PATCH] ejbjar task doesn't accept spaces in pathnames
Date Wed, 04 Apr 2001 18:07:24 GMT
The ejbjar task gives an obscure error about the jar file requiring the
suffix ".jar" if the directory paths include spaces. A patch to
src/org/apache/tools/taskdefs/optional/ejb/WeblogicDeploymentTool.java is
attached that avoids creating the command line as a space-delimited string
that is then reparsed and instead adds each part individually.



--- WeblogicDeploymentTool.java.orig	Wed Apr 04 13:54:32 2001
+++ WeblogicDeploymentTool.java	Tue Apr 03 00:30:24 2001
@@ -378,17 +378,6 @@
         String ejbcClassName = ejbcClass;
         
         try {
-            String args = additionalArgs;
-            if (keepgenerated) {
-                args += " -keepgenerated";
-            }
-            
-            if (compiler != null) {
-                args += " -compiler " + compiler;
-            }
-            
-            args += " " + sourceJar.getPath() + " " + destJar.getPath();
-            
             javaTask = (Java) getTask().getProject().createTask("java");
             javaTask.setTaskName("ejbc");
             if (ejbcClassName == null) {
@@ -406,8 +395,18 @@
             }
                  
             javaTask.setClassname(ejbcClassName);
-            Commandline.Argument arguments = javaTask.createArg();
-            arguments.setLine(args);
+            javaTask.createArg().setLine(additionalArgs);
+            if (keepgenerated) {
+                javaTask.createArg().setValue("-keepgenerated");
+            }
+            if (compiler != null) {
+                javaTask.createArg().setValue("-compiler");
+                javaTask.createArg().setValue(compiler);
+            }
+            javaTask.createArg().setValue(sourceJar.getPath());
+            javaTask.createArg().setValue(destJar.getPath());
+            
+            
             Path classpath = wlClasspath;
             if (classpath == null) {
                 classpath = getCombinedClasspath();

Mime
View raw message