ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scot P. Floess" <>
Subject Re: Pass Quotes to arg line
Date Wed, 16 Jul 2008 13:26:29 GMT
I have a solution for you that works :)  Took me a little googling...but 
this should do what you want...  Please note, the Bash shell script below 
is entitled and "lives" next to the build.xml:

<project  default = "try">
     <target name="try">
         <exec executable="./" failonerror="true">
             <arg line="start &#8220;this is a test&#8221;"/>


echo "Command line params = [$*]"

echo " "
echo "Each param:"
for aParam in $*
     echo "    [$aParam]"

Here is the link where I found the numerics I used above:

I tried the &quot; as no avail...  And yes \" didn't work 

However when I run the above Ant script in conjunction with the Bash shell 
script, I get the following output:

Buildfile: build.xml

      [exec] Command line params = [start "this is a test"]
      [exec] Each param:
      [exec]     [start]
      [exec]     ["this]
      [exec]     [is]
      [exec]     [a]
      [exec]     [test"]

Hope that helps :)


On Tue, 15 Jul 2008, Peters, John wrote:

> Hello,
> I'm trying to pass quotes to the arg line for a parameter that has
> spaces in it.
> I've tried &quot; but that didn't seem to work.
> Also tried "" \".
> Any suggestions?
> <target name="call_tfsbuild" depends="process_proj">
>  <exec executable="${os.tfsbuild}" failonerror="true">
>  <arg line="start ${os.tfsmstr} ${cc.vob} ${cc.proj}
> /msBuildArguments:/p:LabelComment=Label for Build at ${local.time.start}
> " />
>  </exec>
> </target>
> Blue Cross Blue Shield of Florida, Inc., and its subsidiary and affiliate companies are
not responsible for errors or omissions in this e-mail message. Any personal comments made
in this e-mail do not reflect the views of Blue Cross Blue Shield of Florida, Inc.  The information
contained in this document may be confidential and intended solely for the use of the individual
or entity to whom it is addressed.  This document may contain material that is privileged
or protected from disclosure under applicable law.  If you are not the intended recipient
or the individual responsible for delivering to the intended recipient, please (1) be advised
that any use, dissemination, forwarding, or copying of this document IS STRICTLY PROHIBITED;
and (2) notify sender immediately by telephone and destroy the document. THANK YOU.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate
Chief Architect JavaPIM

Architect Keros

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message