From 09f141b7657e0ccbc3c3da5eb5c991501c333976 Mon Sep 17 00:00:00 2001 From: Antoine Levy-Lambert Date: Thu, 3 Jul 2003 21:48:06 +0000 Subject: [PATCH] Nested websphere element for ejbjar does not support spaces in file name. This commit addresses this issue PR: 21298 Submitted by: Lee Carver (leeca at pnambic dot com) git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274754 13f79535-47bb-0310-9956-ffa450edef68 --- .../optional/ejb/WebsphereDeploymentTool.java | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java index ef56cdf36..d5956f87e 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java @@ -573,19 +573,6 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { private void buildWebsphereJar(File sourceJar, File destJar) { try { if (ejbdeploy) { - String args = - " " + sourceJar.getPath() + - " " + tempdir + - " " + destJar.getPath() + - " " + getOptions(); - - if (getCombinedClasspath() != null && getCombinedClasspath().toString().length() > 0) { - args += " -cp " + getCombinedClasspath(); - } - - // Why do my ""'s get stripped away??? - log("EJB Deploy Options: " + args, Project.MSG_VERBOSE); - Java javaTask = (Java) getTask().getProject().createTask("java"); // Set the JvmArgs javaTask.createJvmarg().setValue("-Xms64m"); @@ -606,9 +593,14 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { javaTask.setTaskName("ejbdeploy"); javaTask.setClassname("com.ibm.etools.ejbdeploy.EJBDeploy"); - Commandline.Argument arguments = javaTask.createArg(); - - arguments.setLine(args); + javaTask.createArg().setValue(sourceJar.getPath()); + javaTask.createArg().setValue(tempdir); + javaTask.createArg().setValue(destJar.getPath()); + javaTask.createArg().setLine(getOptions()); + if (getCombinedClasspath() != null && getCombinedClasspath().toString().length() > 0) { + javaTask.createArg().setValue("-cp"); + javaTask.createArg().setValue(getCombinedClasspath().toString()); + } Path classpath = wasClasspath;