简体   繁体   English

如何使用Maven的程序集插件向jar清单添加Implementation-Version值?

[英]How do I add an Implementation-Version value to a jar manifest using Maven's assembly plugin?

I'd like to add an Implementation-Version line to a manifest in my jar file that reflects the POM version number, using the maven assembly plugin. 我想使用maven程序集插件向我的jar文件中的清单添加一个实现版本行,该清单反映了POM版本号。

Note that this is similar but different to another of my recent questions about the jar plugin. 请注意,这与我最近关于jar插件的另一个问题类似但不同。

Actually I'm a fool.. you do it in exactly the same way, ie 其实我是个傻瓜......你用完全相同的方式做到这一点,即

<configuration>
 <archive>
  <manifest>
   <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
  </manifest>
 </archive>
</configuration>

Silly question. 愚蠢的问题。 Should have tried that first, really. 应该先尝试一下,真的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用Maven将实现版本值添加到jar清单? - How do I add an Implementation-Version value to a jar manifest using Maven? 如何在Maven项目的清单中的Implementation-Version字段中获取git SHA1值? - How to get the git SHA1 value in the Implementation-Version field in the manifest for a Maven project? 如何使用maven程序集插件配置jar文件的清单文件? - How to configure a manifest file of a jar file by using the maven assembly plugin? 如何更改maven打包的jar权限? 我正在使用maven程序集插件 - How to change permission of jar packaged by maven? I am using maven assembly plugin 使用 maven-shade-plugin 时如何将 DefaultImplementationEntries 添加到 MANIFEST? - How to add DefaultImplementationEntries to MANIFEST when using maven-shade-plugin? Maven:构建可运行的jar,然后使用maven-assembly-plugin添加到zip - Maven: Build runnable jar and then add to zip with maven-assembly-plugin Java Maven:程序返回 Java-Runtime Version 而不是 Implementation-Version - Java Maven: instead of Implementation-Version program returns Java-Runtime Version 从 WAR 获取实现版本 - Get Implementation-Version from WAR quarkus-maven-plugin 不向 MANIFEST 添加实现条目 - quarkus-maven-plugin does not add implementation-entries to MANIFEST 如何升级maven插件的版本? - How do I upgrade the version of a maven plugin?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM