ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kief Morris <>
Subject Filtering paths into property files
Date Fri, 06 Jul 2001 07:13:52 GMT
I don't know whether there's a reasonable solution to this - I'm
using Ant to build a project which includes a properties file,
and that properties file contains file paths used by code in
the application. 

The problem is when I use filtering to write the paths into the
properties file on the Windows platform. The paths, are correctly 
handled by ant (e.g. "c:\www\foo"), but those back-slashes
need to be escaped in order to work in the properties file:
my java code reads it as something like "c:wwoo".

These paths are built and used in my web.xml file for things 
like copying build files to their locations, as well as in the
application's properties file for application configuration purposes.
I suppose I could double them up everywhere, but that's really
clumsy, ugly, and error-prone. Does anybody have a nicer
solution to this?


View raw message