In an OSGi bundle, the MANIFEST.MF
file, located in the META-INF
directory, serves as a crucial descriptor that provides essential metadata about the bundle. Its primary purpose is to enable the OSGi framework to:
Here's a breakdown of key functions :
Bundle-SymbolicName
: Uniquely identifies the bundle.Bundle-Version
: Specifies the bundle's version.Import-Package
: Lists the packages that the bundle requires from other bundles.Export-Package
: Lists the packages that the bundle makes available to other bundles.Bundle-Activator
: Specifies the Java class that the framework should use to start and stop the bundle.In essence, the MANIFEST.MF
file is the cornerstone of OSGi's modularity, enabling the framework to dynamically manage and connect bundles.