ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peters, John" <John.Pet...@bcbsfl.com>
Subject RE: Pass Quotes to arg line
Date Wed, 16 Jul 2008 13:33:01 GMT
Thank you very much for the work around 

-----Original Message-----
From: Scot P. Floess [mailto:floess@mindspring.com] 
Sent: Wednesday, July 16, 2008 9:26 AM
To: Ant Users List
Subject: Re: Pass Quotes to arg line

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 myscript.sh and "lives" next to the build.xml:

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


#!/bin/bash

echo "Command line params = [$*]"

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


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

http://www.dwheeler.com/essays/quotes-in-html.html

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

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

Buildfile: build.xml

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

Hope that helps :)

Flossy


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: user-unsubscribe@ant.apache.org For additional

> commands, e-mail: user-help@ant.apache.org
>
>

Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

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

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim

Architect Keros          http://sourceforge.net/projects/keros

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional
commands, e-mail: user-help@ant.apache.org





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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message