ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Problem with <macrodef> + <script language="javascript"> on Windo ws
Date Tue, 09 Mar 2004 08:49:18 GMT
On Mon, 8 Mar 2004, Dominique Devienne <DDevienne@lgc.com> wrote:

>           file = project.resolveFile("@{file}");
...

> In the <last-modified> macro, when called from the other macro,
> the file attribute has lost of its back-slashes '\'...

Because it lives inside a JavaScript string and JavaScript uses
backslashes as escape characters.  <macrodef> is only doing a textual
replace.

Is there the equivalent of C#'s @"string" syntax in JavaScript?  I
don't think so.

Turn

>       <property name="@{name}.dest"
>                 location="${helpzips}/com_lgc_@{name}_help.zip" />

into

      <property name="@{name}.dest"
                value="${helpzips}/com_lgc_@{name}_help.zip" />

It won't hurt since you are using project.resolveFile anyway and you
don't have any backslashes in the string - unless the expanded
helpzips property contains some.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message