ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: More issues with Ant and Starteam
Date Tue, 05 Jun 2001 15:07:02 GMT
--- "O'Hara, Patrick" <patrick.ohara@workscape.com> 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>
  <exec executable="foo">
     <arg line='co -p "foo:bar baz:blat" -fs'/>
  </exec>
  <exec executable="foo">
     <arg line="co -p &quot;foo:bar baz:blat&quot; -fs"/>
  </exec>
</target>

Results in:
runfoo:
     [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

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Mime
View raw message