[英]ANT Modify property in ini file
我有一個ini文件,我應該給它添加一個新值,ini文件看起來像:
osgi.instance.area.default=@user.home/workspace95
osgi.framework=file\:plugins/org.eclipse.osgi_3.9.0.v20130529-1710.jar
equinox.use.ds=true
我想通過ANT任務訪問此文件,並向其添加一個新屬性,如下所示:
osgi.instance.area.default=@user.home/workspace95
osgi.framework=file\:plugins/org.eclipse.osgi_3.9.0.v20130529-1710.jar
osgi.usesTimeout=1
equinox.use.ds=true
謝謝你的幫助!
在您的螞蟻目標中,您可以這樣說:
.
.
<echo message="${line.separator}equinox.use.ds=true" file="${build.dir}/tmp.tmp"/>
<concat destfile="${build.dir}/new.ini" append="true">
<fileset file="${build.dir}/my.ini"/>
<fileset file="${build.dir}/tmp.tmp"/>
</concat>
<delete file="${build.dir}/tmp.tmp"/>
.
.
假設,您的初始屬性文件集存儲在build.dir / my.ini中
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.