如何使用 zipfileset src 属性而无需为所有 jar 手动指定它?
我目前有这个:
<jarjar destfile="a.jar" manifest="Manifest.mf">
<zipfileset src="first.jar"/>
<zipfileset src="second.jar"/>
</jarjar>
问题是我必须手动指定每个 jar,因为我需要考虑 src 参数。我想要这样的东西:
<zipfileset>
<include name="*.jar"/>
<zipfileset>
并将它们的内容提取并包含在我生成的存档中。这可能吗?
I currently have this:
<jarjar destfile="a.jar" manifest="Manifest.mf">
<zipfileset src="first.jar"/>
<zipfileset src="second.jar"/>
</jarjar>
The problem is I have to manually specify each jar, because I need the src parameter to be taken in consideration. I would want something like this:
<zipfileset>
<include name="*.jar"/>
<zipfileset>
And have their contents extracted and included in my resulting archive. Is this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
也许您可以首先使用以下命令合并 jar,
并在 zipfileset 中指定合并的 jar。
zipgroupfileset
Maybe you could merge the jars first with:
and specify the merged jar in the zipfileset.
zipgroupfileset
根据 jarjar wiki 上的评论,您可以在 jarjar 中使用它
:没试过。
According to comments on the jarjar wiki, you can use this in your jarjar:
I haven't tried it.