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:[EMAIL PROTECTED]] Sent: Tuesday, March 05, 2002 9:49 AM To: 'Ant Users List' Subject: RE: Own task. Commandline Look how <exec> deals with args of type <arg value="beforespace after space">, 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:[EMAIL PROTECTED]] 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: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
