[英]How do I add an Implementation-Version value to a jar manifest using Maven's assembly plugin?
[英]How do I add an Implementation-Version value to a jar manifest using Maven?
我想将一个Implementation-Version行添加到我的jar文件中反映POM版本号的清单。 我不能为我的生活找出如何使用jar插件做到这一点。
这可能吗?
你会使用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>
这会将以下内容添加到清单文件中:
Implementation-Title: ${pom.name}
Implementation-Version: ${pom.version}
Implementation-Vendor-Id: ${pom.groupId}
Implementation-Vendor: ${pom.organization.name}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.