Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 4930 invoked from network); 19 Jan 2004 12:16:06 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 19 Jan 2004 12:16:06 -0000 Received: (qmail 92441 invoked by uid 500); 19 Jan 2004 12:15:55 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 92408 invoked by uid 500); 19 Jan 2004 12:15:55 -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 92394 invoked from network); 19 Jan 2004 12:15:54 -0000 Received: from unknown (HELO corvil.com) (213.94.219.177) by daedalus.apache.org with SMTP; 19 Jan 2004 12:15:54 -0000 Received: from corvil.com (preilly.local.corvil.com [172.18.1.173]) by corvil.com (8.12.9/8.12.5) with ESMTP id i0JCFrEu051560 for ; Mon, 19 Jan 2004 12:15:53 GMT (envelope-from peter.reilly@corvil.com) Message-ID: <400BC9DE.1030203@corvil.com> Date: Mon, 19 Jan 2004 12:13:18 +0000 From: Peter Reilly User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Users List Subject: Re: Problem with command arguments References: <20040117201146.49768.qmail@web21507.mail.yahoo.com> In-Reply-To: <20040117201146.49768.qmail@web21507.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 michelle zaremskas wrote: >I have an Ant task that I am writing which is invoking a Windows Command Line program. An example of the string I am attempting to contruct is: > > >pcli Put -prd:\pvcs\vm\sampledb aC:\test -o -m "My Description" -v"My Version label" bp/chess/server /chess/server/server.bat /chess/server/shutdown.txt > > > The following should work: The ant api would follow the above: execTask = project.createTask("exec"); Commandline.Argument arg; arg = execTask.createArg(); arg.setValue("Put"); arg = execTask.createArg(); arg.setValue("-prd:\pvcs\vm\sampledb"); arg = execTask.createArg(); arg.setValue("-o"); arg = execTask.createArg(); arg.setValue("-m"); arg.setValue("My Description") etc Peter > > >The problem is I am having is that the command line executable will not allow a "space" after the -m parameter and it requires double quotes around the value I am passing. When I attempt to construct the Command Argument using the ANT API it will either place a space after the '-m' parameter or it will place double quotes around the string like so: "-mMy Description". > > > >Can someone provide me some guidance on how I can correctly construct this string using the Ant API for my ANT task. > > > >--------------------------------- >Do you Yahoo!? >Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org