ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From removeps-gene...@yahoo.com
Subject how to make replace task not expand Java properties like ${user.home}
Date Wed, 19 Nov 2008 04:42:52 GMT
Hi.  I'm writing an ant task to replace

APPBASE

with

${user.home}/public_html


The command

<replace file="server.xml" token="APPBASE" value="${user.home}/public_html"/>

does replaces APPBASE, but it expands ${user.home}.  I don't want it to expand this variable
as I will be copying server.xml to another location, and the expanded value of the Java property
is different.

(BTW, I'm creating several different server.xml, and each one has a totally different value
for APPBASE.)

So I tried

<replace file="server.xml" token="APPBASE" value="\$\{user.home\}/public_html"/>

but the output is has the back slashes in it.

Thanks.

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


Mime
View raw message