【发布时间】:2019-12-13 02:55:12
【问题描述】:
我正在向 Maven 中的 MANIFEST.MF 添加条目,例如
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<index>true</index>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addBuildEnvironmentEntries>true</addBuildEnvironmentEntries>
</manifest>
<manifestSections>
<manifestSection>
<name>GAV</name>
<manifestEntries>
<GroupId>${project.groupId}</GroupId>
<ArtifactId>${project.artifactId}</ArtifactId>
<Version>${project.version}</Version>
<Packaging>${project.packaging}</Packaging>
</manifestEntries>
</manifestSection>
...
条目出现,但顺序是任意的。这对于读取它们的脚本无关紧要,但对于喜欢查找某些东西的人来说,文件看起来很乱。有没有办法确定MANIFEST.MF中条目的顺序?
【问题讨论】:
标签: java maven jar manifest.mf maven-jar-plugin