You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Daniel Kalcevich <DK...@mercuryinsurance.com> on 2005/01/18 01:42:33 UTC

Command Line arguments with spaces

I know this has probably been asked a lot, but is there any way I can
pass a command line argument with spaces in it, and not have it be
wrapped in double quotes by ANT?  I have code similar to the following:

 

private void getStreamCommand(Commandline cmd) {

            if (getStream() != null) {

                  /* Had to make two separate commands here because if a
space is

                     inserted between the flag and the value, it is
treated as a

                     Windows filename with a space and it is enclosed in
double

                     quotes ("). This breaks clearcase.

                  */

                  cmd.createArgument().setValue(STREAM);

                  cmd.createArgument().setValue(getStream());

            }

      }

The getStream() method returns a value like "with nothing" where there
is a space in the value.  Can someone please let me know?  Thanks.

Daniel

 


This email and/or any files or attachments transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this e-mail and/or any files or attachments transmitted with it is strictly forbidden. If you have received this email in error, please delete the e-mail and/or any files or attachments, and also notify the system manager (PostMaster@mercuryinsurance.com) of the error. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email and/or any files or attachments transmitted with it.