You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by re...@yahoo.com on 2008/11/19 05:42:52 UTC
how to make replace task not expand Java properties like ${user.home}
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
AW: how to make replace task not expand Java properties like ${user.home}
Posted by "Knuplesch, Juergen" <Ju...@icongmbh.de>.
Never did this, but I would try sth like:
<property name="setuser.home" value="{user.home}"
<replace file="server.xml" token="APPBASE" value="$${setuser.home}/public_html"/>
--
Jürgen Knuplesch
-----Ursprüngliche Nachricht-----
Von: removeps-generic@yahoo.com [mailto:removeps-generic@yahoo.com]
Gesendet: Mittwoch, 19. November 2008 05:43
An: user@ant.apache.org
Betreff: how to make replace task not expand Java properties like ${user.home}
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
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: how to make replace task not expand Java properties like ${user.home}
Posted by Harnack Frank <Fr...@bitmarck.de>.
Hello,
try $${user.home}/public_html !
Regards
Frank
-----Original Message-----
From: removeps-generic@yahoo.com [mailto:removeps-generic@yahoo.com]
Sent: Wednesday, November 19, 2008 5:43 AM
To: user@ant.apache.org
Subject: how to make replace task not expand Java properties like
${user.home}
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
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org