Conventions for additional content of the manifest.mf file?

ぐ巨炮叔叔 提交于 2019-12-22 06:59:08

问题


Are there any conventions for the MANIFEST.MF file in a Java JAR beyond the JAR specification? Interesting information I might want to include are: Build date and other build information, SVN Revision, perhaps a description. I haven't found suggestions how to name the corresponding keys. Are there any de facto standards or at least common key names that are used in manifests for things that are not covered by the spec?


回答1:


The JAR Manifest: Overview mentions that "Attributes which are not understood are ignored." Anything but a Main Attribute should be OK. Here's a somewhat more comprehensive summary link and a handy utility to examine the manifest in situ.




回答2:


You can include any key/value pair that does not break the spec. (e.g. in length of value). As to how to do it, it would depend on what tool you are using to create the manifest.




回答3:


The specification might be useful for writing good manifest files.



来源:https://stackoverflow.com/questions/7670602/conventions-for-additional-content-of-the-manifest-mf-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!