ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "N. J. O'Neill" <njone...@llnl.gov>
Subject RE: How to escape "
Date Thu, 03 May 2001 22:57:29 GMT

OK, after a bit of testing and RTFM it looks like you might want to use the 
'value' attribute instead of the 'line' attribute.  That is,

    <exec executable="cscript">
       <arg value='..\ConfigFiles\EpiMgr.vbs -P ""'/>
    </exec>

If this fails, you might want to try separating out the arguments like this

    <exec executable="cscript">
       <arg value='..\ConfigFiles\EpiMgr.vbs'/>
       <arg value='-P'/>
       <arg value='""'/>
    </exec>



The problem you are encountering may just be a documentation error.  Ant is 
applying undocumented parsing rules to the 'line' attribute that are not 
consistent with its definition as "a space-delimited list of command-line 
arguments."  In particular, it is treating quotes as delimiters.


--Neil



>No it doesn't work, I need -P "" but it comes out as -P
>see below...
>
><exec executable="cscript">
>         <arg line='..\ConfigFiles\EpiMgr.vbs -P ""'/>
></exec>
>
>[exec] cscript ..\ConfigFiles\EpiMgr.vbs -P
>Execute:CommandLauncher: cscript ..\ConfigFiles\EpiMgr.vbs -P
>
> > -----Original Message-----
> > From: N. J. O'Neill [mailto:njoneill@llnl.gov]
> > Sent: Thursday, May 03, 2001 11:24 AM
> > To: ant-user@jakarta.apache.org
> > Subject: Re: How to escape "
> >
> >
> >
> > >Use:
> > >
> > ><arg line="-h -f &quot;something&quot; -m -l"/>
> > >
> > >Diane
> >
> >
> > But for sanity's sake, how about:
> >
> >    <arg line='-h -f "something" -m -l'/>
> >
> >
> > --Neil
> >


Mime
View raw message