更新时间:2023-02-03 15:53:12
Jar/Ear Ant 任务是更通用的 Zip 任务.这意味着您还可以在 Jar 任务中使用 zipfileset
:
The Jar/Ear Ant tasks are subtasks of the more general Zip task. This means that you can also use zipfileset
in your Jar task:
<jar destfile="${jar.file}" basedir="...">
<zipfileset dir="${project.path}" includes="*.jar" prefix="libs"/>
</jar>
我还看到您定义了一个单独的清单文件以包含在 Jar 中.您还可以使用嵌套的 manifest
命令:
I've also seen that you define a separate manifest file for inclusion into the Jar. You can also use a nested manifest
command:
<jar destfile="@{destfile}" basedir="@{basedir}">
<manifest>
<attribute name="Built-By" value="..."/>
<attribute name="Built-Date" value="..."/>
<attribute name="Implementation-Title" value="..."/>
<attribute name="Implementation-Version" value="..."/>
<attribute name="Implementation-Vendor" value="..."/>
</manifest>
</jar>