Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 68385 invoked from network); 5 Mar 2002 15:49:16 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 5 Mar 2002 15:49:16 -0000 Received: (qmail 18454 invoked by uid 97); 5 Mar 2002 15:48:43 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 18367 invoked by uid 97); 5 Mar 2002 15:48:42 -0000 Mailing-List: contact ant-user-help@jakarta.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 ant-user@jakarta.apache.org Received: (qmail 18266 invoked from network); 5 Mar 2002 15:48:41 -0000 Message-ID: From: Dominique Devienne To: "'Ant Users List'" Subject: RE: Own task. Commandline Date: Tue, 5 Mar 2002 09:48:38 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="ISO-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Look how deals with args of type , and you should have your answer. Any arg specified with the value attribute that contains a space will be double-quoted on the command line generated. I haven't checked, but the solution might be: Commandline commandLine = new Commandline(); commandLine.setExecutable("cmdclient"); commandLine.createArgument().setValue("-user"); commandLine.createArgument().setValue("integrator"); log("Executing " + commandLine.toString()); --DD -----Original Message----- From: Natalia Bello [mailto:NBELLO@isabel.be] Sent: Tuesday, March 05, 2002 8:56 AM To: 'Ant Users List' Subject: Own task. Commandline Hello! I am trying to develop my own task; in this task I need to execute a command line like this: cmdclient -user "integrator" -pass "password" .. that is, i need to set the arguments between double quotes!! I have tried some posibilites, but i havent success! If i try for example Commandline commandLine = new Commandline(); commandLine.setExecutable("cmdclient"); commandLine.createArgument().setValue("-user \"integrator\""); log("Executing " + commandLine.toString()); I get: [CBL] Executing cmdclient '-user "integrator"' or this other Commandline commandLine = new Commandline(); commandLine.setExecutable("cmdclient"); commandLine.createArgument().setLine("-user \"integrator\""); log("Executing " + commandLine.toString()); I get: [CBL] Executing cmdclient -user integrator or: Commandline commandLine = new Commandline(); commandLine.setExecutable("cmdclient"); commandLine.createArgument().setValue("-user"); commandLine.createArgument().setValue("\"integrator\""); log("Executing " + commandLine.toString()); I get again: [CBL] Executing cmdclient -user integrator Does anyone now how i can do this? Thanks in advanced, Natalia -- To unsubscribe, e-mail: For additional commands, e-mail: