为什么下面的代码不起作用?在创建的新文件中,filterset不会执行单个替换
<copy file="${WT_HOME}/conf/auditing/configAudit.xml"
tofile="${WT_HOME}/conf/auditing/configAudit1.xml"
overwrite="true">
<filterset>
<filter token="false" value="true"/>
</filterset>
</copy>
Run Code Online (Sandbox Code Playgroud)
小智 6
迟到的答案,但此页面在Google的"ant copy filter replace"搜索结果中排名很高:
尝试使用tokenfilter / replacecestring instaed过滤链:
<copy file="${WT_HOME}/conf/auditing/configAudit.xml" tofile="${WT_HOME}/conf/auditing/configAudit1.xml" overwrite="true">
<filterchain>
<tokenfilter>
<replacestring from="false" to="true"/>
</tokenfilter>
</filterchain>
</copy>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5911 次 |
| 最近记录: |