在build.xml中创建属性文件

use*_*054 0 ant build.xml

我想动态创建一个.properties文件,并且相同的代码应该在build.xml中包含一些值,并希望将它放在某个目录中.

请帮忙

Lol*_*olo 5

您应该使用PropertyFile Ant任务,例如:

<propertyfile file="my.properties">
  <entry key="prop.1" value="value 1"/>
  <entry key="prop.2" value="value 2"/>
</propertyfile>
Run Code Online (Sandbox Code Playgroud)