ANT读取现有清单版本并向其追加 [英] ANT read existing MANIFEST version and append to it

查看:106
本文介绍了ANT读取现有清单版本并向其追加的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要剧本Ant构建其内容在从META-INF / MANIFEST.MF文件的现有版本,并追加到它。

I need to script an ant build which reads in the existing version from a META-INF/manifest.mf file and appends to it.

的更新应该用ANT是可能的清单的任务,但是我已经无法读取现有版本。

The updating should be possible using the ANT manifest task, however I've had trouble reading the existing version.

由于清单条目都使用的的而不是的=的的我不能看他们使用Ant的 loadproperties 的任务。

As the manifest entries are use key: value rather than key= value I cant read them in using ANT's loadproperties task.

有没有人这样做了/有什么想法?

Has anyone done this/ have any ideas?

感谢

推荐答案

<&舱单GT; 任务应该做的正是你想要的。它将新的Manifest key = value对添加到现有的清单。任何想法,为什么不能使用呢?

The <manifest> task should do exactly what you want. It will append new Manifest key=value pairs to an existing Manifest. Any idea why you can't use it?

您可以使用&LT; CONCAT&GT; 任务的各种过滤器的读者,然后加载与结果&LT; loadproperties&GT; 任务。这需要一点苦劳,但它可能对你的损坏的清单文件阅读这种方式,得到的值,然后重新与旧值新的Manifest文件的方式。

You can use the <concat> task with the various filter readers, and then load the result with the <loadproperties> task. It takes a bit of elbow grease, but it might be a way to read in your damaged Manifest file this way, get the values, and then rewrite a new Manifest file with those old values.

我要看看现有的Manifest的样品,你想,以增加它搞清楚你到底需要什么。

I'd have to see a sample of your existing Manifest and what you want to add to it in order to figure out exactly what you need.

这篇关于ANT读取现有清单版本并向其追加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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