ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Natalia Bello <NBE...@isabel.be>
Subject Own Task. Quoting problem.
Date Wed, 06 Mar 2002 09:07:29 GMT
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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message