ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "O'Hara, Patrick" <>
Subject RE: More issues with Ant and Starteam
Date Tue, 05 Jun 2001 15:28:16 GMT
I assume that the reason the arguments below are surrounded with quotes is
because there is a space in them.  The argument that I need quotes around
does not and can not contain a space.

Pat O'Hara

-----Original Message-----
From: Diane Holt []
Sent: Tuesday, June 05, 2001 10:07 AM
Subject: Re: More issues with Ant and Starteam

--- "O'Hara, Patrick" <> wrote:
> Ant is complaining about the exec task below.
> 	<exec executable="stcmd" dir="${build.basedir}">
> 	  <arg line=" co -p
> \"${starteam.username}:${starteam.password}
> @${starteam.servername}:${starteam.port}/${starteam.projname}/
> ${starteam.viewname}/dev/DeploymentDescriptors\
> " -fs"/>
> 	</exec>
> I have determined that the issue is the quotes within the command line. 
> I have tried replacing the \" with the &quot; macro, but I got
> "Reference to undefined entity".

Not sure why it would say that -- using &quot; should've been okay.

> I am wondering if anyone has an example of a command line that has
> embedded quotes in it? I am using ANT 1.3 on Win2K.

Any of these should work:
<target name="runfoo">
  <exec executable="foo">
     <arg line="co -p"/>
     <arg value="foo:bar baz:blat"/>
     <arg value="-fs"/>
  <exec executable="foo">
     <arg line='co -p "foo:bar baz:blat" -fs'/>
  <exec executable="foo">
     <arg line="co -p &quot;foo:bar baz:blat&quot; -fs"/>

Results in:
     [exec] foo co -p "foo:bar baz:blat" -fs
     [exec] foo co -p "foo:bar baz:blat" -fs
     [exec] foo co -p "foo:bar baz:blat" -fs



Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!

View raw message