Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 59112 invoked from network); 18 Jan 2004 23:43:56 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 18 Jan 2004 23:43:56 -0000 Received: (qmail 97235 invoked by uid 500); 18 Jan 2004 23:43:35 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 96996 invoked by uid 500); 18 Jan 2004 23:43:34 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 96979 invoked from network); 18 Jan 2004 23:43:34 -0000 Received: from unknown (HELO web21501.mail.yahoo.com) (66.163.169.12) by daedalus.apache.org with SMTP; 18 Jan 2004 23:43:34 -0000 Message-ID: <20040118234341.30069.qmail@web21501.mail.yahoo.com> Received: from [68.65.180.85] by web21501.mail.yahoo.com via HTTP; Sun, 18 Jan 2004 15:43:41 PST Date: Sun, 18 Jan 2004 15:43:41 -0800 (PST) From: javamz Subject: Re: Problem with command arguments To: Ant Users List In-Reply-To: <400B000C.9050909@ePost.de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1357808521-1074469421=:28803" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --0-1357808521-1074469421=:28803 Content-Type: text/plain; charset=us-ascii Thanks for the response....I am doing as you suggested, but what is happening is that I am getting a single quote surrounding the argument value. Here's an example of the command line string that is being constructed: pcli Run -Y Put -prS:\\PVCSCTRL\\APP_JAVA_FW -yf -nv '-m"My Description"' '-v"V6.2.0 RC2"' -o -aC:\data\WSAD\WSADV5.1\CJF-BrioV3.1/MZTest -l -z /ProjectFolder/MZTest Note the argument '-m"MyDescription"'. I need the double quotes are "My Description", but I do not want the single quote surrounding the argument....and I cannot have a space after the -m. I have tried using both the setValue method and the setLine method, but none seem to get me the result I need. Here is the code I am using to construct this command line argument: /** * Set up the "Put" command using the supplied parameters. The * following is an example of the command we are constructing: * pcli Put -prS:\\PVCSCTRL\APP_JAVA_FW -vV6.2 RC2 -yf -nv -m"My change description" -v"My Label" -z /MZTest */ commandLine.clearArgs(); commandLine.createArgument().setValue("Run"); log("TaskName: " + this.taskName); commandLine.createArgument().setValue("-Y"); commandLine.createArgument().setValue((getExecutable(PUT_EXE))); commandLine.createArgument().setValue("-pr" + getRepository()); commandLine.createArgument().setValue("-yf"); commandLine.createArgument().setValue("-nv"); if (getDescription() != null){ commandLine.createArgument().setValue("-m\"" + getDescription() + "\""); } else { throw new org.apache.tools.ant.BuildException("CignaPvcs:executePut - Missing Required attribute 'Description'..."); } if (getLabel() != null) { commandLine.createArgument().setValue("-v\"" + getLabel() + "\""); } if (getWorkspace() != null) { commandLine.createArgument().setLine("-o"); commandLine.createArgument().setLine("-a" + getWorkspace()); } if (getBasepath() != null ) { commandLine.createArgument().setValue("-bp"); commandLine.createArgument().setLine("\"" + getBasepath() +"\""); } if (getLock() != null && getLock().equalsIgnoreCase("true")) { commandLine.createArgument().setValue("-l"); } commandLine.createArgument().setValue("-z"); if (getPvcsproject() != null) { commandLine.createArgument().setLine(getPvcsproject()); } log("Checking in files", Project.MSG_INFO); log("Executing " + commandLine.toString(), Project.MSG_INFO); result = runCmd(commandLine, new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN)); Thomas Schapitz wrote: Ahh... sorry, I missed the three letters API.... but even then, Antoines suggestion should be turned into ... arg1.setValue("-m\"My Description\""); ... Thomas --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org --------------------------------- Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes --0-1357808521-1074469421=:28803--