ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Detlef Brendle" <detlef.bren...@canoo.com>
Subject RE: back slash and property files
Date Mon, 08 Jul 2002 07:03:22 GMT
>From what I can see here I would say theres no way doing this with simple
ant feature - neither in 1.4 nor in 1.5.
The problem is that Ant uses Java property files as input and in Java you
always have to
escape '\' and ':' plus other special chars.

Suggestions for this are:
- make the property file JAVA like
- write a task to manually read from this property file and handle
backslashes in your own way.


regards,
detlef



-----Original Message-----
From: Mike Cavedon [mailto:mc@sonicsoftware.com]
Sent: Wednesday, July 03, 2002 9:58 PM
To: ant-user@jakarta.apache.org
Subject: back slash and property files



I have an existing property file that contains properties such as:

INSTALL_DIR=C:\Program Files\Install Directory

This property file is used by several processes, so I want to keep the
single back slash.

If  I then execute a replacefilter like the following:

            <replacefilter token="@INSTALL_DIR@" property="INSTALL_DIR"/>

My final property looks like:

    <Attribute name="INSTALL_DIR" type="string" value="C:Program
FilesInstall Directory"/>

Is there any option I can use to tell ANT that the single backslash
should not be removed during the replace?

Thanks.

Mike





--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message