我目前有这个:
<jarjar destfile="a.jar" manifest="Manifest.mf">
<zipfileset src="first.jar"/>
<zipfileset src="second.jar"/>
</jarjar>
Run Code Online (Sandbox Code Playgroud)
问题是我必须手动指定每个jar,因为我需要考虑src参数.我想要这样的东西:
<zipfileset>
<include name="*.jar"/>
<zipfileset>
Run Code Online (Sandbox Code Playgroud)
并将其内容提取并包含在我生成的存档中.这可能吗?
oer*_*ers 14
也许你可以先将罐子合并到:
<zip destfile="out.jar">
<zipgroupfileset dir="lib" includes="*.jar"/>
</zip>
Run Code Online (Sandbox Code Playgroud)
并在zipfileset中指定合并的jar.
Run Code Online (Sandbox Code Playgroud)A <zipgroupfileset> allows for multiple zip files to be merged into档案.在此文件集中找到的每个文件都以与添加zipfileset src文件相同的方式添加到存档中.
Run Code Online (Sandbox Code Playgroud)<zipgroupfileset> is a fileset and supports all of its attributes and嵌套元素.
根据jarjar wiki的评论,你可以在你的jarjar中使用它:
<zipgroupfileset dir="lib" includes="*.jar" />
Run Code Online (Sandbox Code Playgroud)
我没试过.