如何存储在文件中Apache Ant的属性值 [英] How to store Apache Ant property value in file
本文介绍了如何存储在文件中Apache Ant的属性值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要修改的是Apache Ant一个(基于XML)文件。 的loadFile任务允许加载在属性文件的内容。但它的(财产)修改后如何保存该属性的值回文件?
I need to modify a (xml-)file from Apache Ant. "loadfile" task allows to load the file's content in a property. But how to store the property's value back to a file after its (property) modification?
当然,我可以编写自定义任务来执行此操作,但我想知道是否有一些现有的实现。
Of course I could write custom task to perform this operation but I would like to know if there's some existing implementation.
推荐答案
您可以使用回声任务。
<echo file="${fileName}" message="${xmlProperty}"/>
借助 echoxml 任务可能会感兴趣的你。
The echoxml task might be of interest to you as well.
这篇关于如何存储在文件中Apache Ant的属性值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文