ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Rosenstrauch <dar...@oneworldinc.com>
Subject Fwd: Need help with args to exec command
Date Fri, 18 May 2001 19:47:38 GMT
Actually, initial problem was solved.  The exe I'm calling allowed some 
flexibility in the parameter structure.

But I have a different, similar problem now.  I got it to generate the 
command line I want successfully:

v:\netscapesigning\signing13\signtool.exe -e.class 
-dv:\netscapesigning\Keys --outfile netscapesigning.out -k "OneWorld, 
Inc.'s VeriSign, Inc. ID #2" .

But I'm getting the single/double quotes error again: "Can't handle single 
and double quotes in same argument".  It doesn't seem to like the argument 
that looks like this:

-k "OneWorld, Inc.'s VeriSign, Inc. ID #2"

because it has a single quote embedded inside.

Any suggestions?  The build step looks like this:

<exec
         dir="classes"
         executable="v:\netscapesigning\signing13\signtool.exe"
         failonerror="yes">
         <arg value="-e.class"/>
         <arg value="-dv:\netscapesigning\Keys"/>
         <arg value="--outfile"/>
         <arg value="netscapesigning.out"/>
         <arg value="-k"/>
         <arg value="OneWorld, Inc.&apos;s VeriSign, Inc. ID #2"/>
         <arg value="."/>
</exec>


TIA!

DR



>Date: Fri, 18 May 2001 14:01:44 -0400
>To: ant-user@jakarta.apache.org
>From: David Rosenstrauch <darose@oneworldinc.com>
>Subject: Need help with args to exec command
>
>Help!
>
>Trying to execute a DOS command like this from my build.xml:
>
>v:\netscapesigning\signing13\signtool.exe -e".class"
>
>
>I tried doing this:
>
><exec
>         dir="classes"
>         executable="v:\netscapesigning\signing13\signtool.exe"
>         failonerror="yes">
>         <arg line="-e&quot;.class&quot;"/>
></exec>
>
>But no dice.  Verbose output shows the command being generated as:
>
>v:\netscapesigning\signing13\signtool.exe -e.class
>
>Quotes are missing.  Bad.
>
>
>So I tried doing this:
><exec
>         dir="classes"
>         executable="v:\netscapesigning\signing13\signtool.exe"
>         failonerror="yes">
>         <arg value="-e&quot;.class&quot;"/>
></exec>
>
>Now the command is generated as:
>
>v:\netscapesigning\signing13\signtool.exe '-e".class"'
>
>Extra quotes were added.  Also bad.  Plus I get an ANT error:
>
>"Can't handle single and double quotes in same argument"
>
>
>Any ideas?
>
>
>Thanks!
>
>
>DR



Mime
View raw message