Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 93287 invoked from network); 5 Mar 2002 16:16:13 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 5 Mar 2002 16:16:13 -0000 Received: (qmail 3468 invoked by uid 97); 5 Mar 2002 16:15:31 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 3444 invoked by uid 97); 5 Mar 2002 16:15:30 -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 3425 invoked from network); 5 Mar 2002 16:15:29 -0000 Message-ID: From: Dominique Devienne To: "'Natalia Bello'" Cc: "'Ant Users List'" Subject: RE: Own task. Commandline Date: Tue, 5 Mar 2002 10:15:23 -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 Never mind. Silly answer: your attribute doesn't contain any spaces, so won't be double-quoted. Sorry. --DD -----Original Message----- From: Dominique Devienne [mailto:DDevienne@lgc.com] Sent: Tuesday, March 05, 2002 9:49 AM To: 'Ant Users List' Subject: RE: Own task. Commandline 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: -- To unsubscribe, e-mail: For additional commands, e-mail: