ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@cortexebusiness.com.au>
Subject Re: Quoting arguments on Windows
Date Sun, 20 May 2001 06:53:06 GMT
Sam,

The quick fix would be for ORO to change their header string, replacing
&quot; with &apos;. The generated HTML for the API will be fine with that.

The longer term solution is going to be a bit ugly I feel. To handle
quoting of single and double quotes in command lines, the Commandline class
is going to have to become platform aware :-(

Conor


----- Original Message -----
From: "Sam Ruby" <rubys@us.ibm.com>
To: <ant-dev@jakarta.apache.org>
Cc: "Daniel F. Savarese" <dfs@savarese.org>
Sent: Sunday, May 20, 2001 12:15 PM
Subject: Quoting arguments on Windows


> I can no longer build jakarta-oro's dist target on Win2K.  The problem is
> the following:
>
>         <javadoc packagenames
>
="org.apache.oro.io,org.apache.oro.text,org.apache.oro.text.regex,org.apach
e.oro.text.awk,org.apache.oro.text.perl,org.apache.oro.util"
>             sourcepath="${build.src}"
>             destdir="${javadoc.destdir}"
>             overview="${build.src}/org/apache/oro/overview.html"
>             author="true"
>             version="true"
>             windowtitle="${Name} ${version} API"
>             doctitle="${Name} ${version} API"
>             header="&lt;a href=&quot;http://jakarta.apache.org/oro/&quot;
target=_top&gt;&lt;img src=&quot;{@docroot}/../images/logoSmall.gif&quot;
> alt=&quot;Jakarta ORO&quot; width=48 height=47 align=center border=0
hspace=1 vspace=1&gt;&lt;/a&gt;"
>             bottom="Copyright &#169; ${year} Apache Software Foundation.
All Rights Reserved.">
>     </javadoc>
>
> More specifically, the problem is that header has quotes in it, and the
> org.apache.tools.ant.types.CommandLine.quoteArgument assumes a Unix
> compatible command line.
>
> For Win2K, the strategy that seems to work for passing an argument which
> contains double quotes through the command interpreter is to triple quote
> the double quote.  An example seems best here:
>
>    Unix:   -header '<a href="http://jakarta.apache.org">Jakarta</a>'
>    Win2K:  -header "<a href="""http://jakarta.apache.org""">Jakarta</a>'
>
> I'm looking for suggestions on how best to approach this problem.
>
> - Sam Ruby
>
>


Mime
View raw message