如何在蚂蚁替换任务中使用属性? [英] How do I use properties in ants replace task?

查看:69
本文介绍了如何在蚂蚁替换任务中使用属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将标记替换为属性.该属性设置了路径位置.我没有得到它,因为它只是用$

I need to replace a token with a property. That property has a path location set. I am not getting it as it is just replacing it with the $

<replace file="${APACHE_HOME}/conf/wc_server1.conf" >
  <replacetoken>@Install_Base_Directory@</replacetoken> 
<replacevalue>$InstallerBase</replacevalue>

推荐答案

您基本上有两个选择:

<replace file="${APACHE_HOME}/conf/wc_server1.conf" >
  <replacetoken><![CDATA[@Install_Base_Directory@]]></replacetoken> 
  <replacevalue><![CDATA[$InstallerBase]]></replacevalue>
</replace>

或由于它仅是一行替换,请使用:

or since it's only a single line replace, use:

<replace file="${APACHE_HOME}/conf/wc_server1.conf" 
  token="@Install_Base_Directory@"
  value="$InstallerBase" />

这篇关于如何在蚂蚁替换任务中使用属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆