Conventions for additional content of the manifest.mf file?
Asked Answered
D

3

5

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?

Demi answered 6/10, 2011 at 5:34 Comment(0)
B
2

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.

Bassarisk answered 11/10, 2011 at 4:1 Comment(0)
D
1

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.

Daly answered 6/10, 2011 at 5:41 Comment(1)
I clarified the question in that I don't care about the tool (I've got one) but about the names for keys.Dissociate
M
0

The specification might be useful for writing good manifest files.

Maggee answered 6/10, 2011 at 8:55 Comment(2)
Sure, that's why I linked to the specification in the question. :-) Actually the tool (maven-jar-plugin) takes care about this. But it does tell me how to name the key for the build date or SVN revision or description - it simply does not care.Dissociate
Sorry, I did not see your link.Maggee

© 2022 - 2024 — McMap. All rights reserved.