Skip to content

Do .kar files need META-INF/MANIFEST.MF? #2192

@dilyanpalauzov

Description

@dilyanpalauzov

It is unclear from https://karaf.apache.org/manual/latest/kar if a .kar file needs META-INF/MANIFEST.MF.

On the one side the spring-4.0.0.kar example contains META-INF/MANIFEST.MF. On the other side the next paragraps says

As a KAR file is a simple zip file, you can create the KAR file by hand.

For instance, the following Unix commands create a very simple KAR file:

~$ mkdir repository
~$ cp /path/to/features.xml repository/features.xml
~$ cp /path/to/my.jar repository/my/project/my/1.0.0/my-1.0.0.jar
~$ zip -r my.kar repository
updating: repository/ (stored 0%)
  adding: repository/my/project/my/1.0.0/my-1.0.0.jar (deflated 0%)
  • my.kar does not contain META-INF/MANIFEST.MF
  • In a test I created locally, mvn install karaf:kar creates a .kar file and it contains under META-INF/MANIFEST.MF:
Manifest-Version: 1.0
Created-By: Kar Maven Plugin 4.4.8
Build-Jdk-Spec: 21

So does a .kar file need a META-INF/MANIFEST.MF? If yes, then what purpose does it serve and what shall be included there? If no, why does Kar Maven Plugin 4.4.8 include it?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions