izb*_*izb 26 java build-process maven-2 jar manifest
我想将一个Implementation-Version行添加到我的jar文件中反映POM版本号的清单.我不能为我的生活找出如何使用jar插件做到这一点.
这可能吗?
Asc*_*ian 41
你会使用Maven Archiver:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
Run Code Online (Sandbox Code Playgroud)
这会将以下内容添加到清单文件中:
Implementation-Title: ${pom.name}
Implementation-Version: ${pom.version}
Implementation-Vendor-Id: ${pom.groupId}
Implementation-Vendor: ${pom.organization.name}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
19336 次 |
| 最近记录: |