What does Tool/Bundle-Name/Export-Package etc. mean in a jar manifest

11,628

Solution 1

The Bundle attributes define info wrt. OSGi bundles. An OSGi bundle is simply a .jar file that also defines (via the attributes) what it exports, and what its dependencies are (including versions). Note that the .jar file can be used as a standard .jar file - the bundle information is only used in an OSGi container.

This JavaWorld article is a good introduction.

Solution 2

This is OSGi. Eclipse uses it, also nutch.

Solution 3

From the Export-Package filed, I'd guess you are looking at an OSGi Bundle.

Check the Wikipedia article or the OSGi homepage for details.

Solution 4

If you want really good explanations for the meanings of OSGi Manifest entries, I strongly suggest you read the specification. It is not very long and will explain in good detail all you want to know. Also, keep in mind that the Manifest.mf file is not specific to OSGi; other Java libraries also make use of it. As such, not all the entries you see above are defined by the OSGi specification, such as 'Tool', and 'Bnd-LastModified', which were added by the Bnd utility.

Share:
11,628

Related videos on Youtube

leeeroy
Author by

leeeroy

Updated on June 04, 2022

Comments

  • leeeroy
    leeeroy almost 2 years

    I'm looking at the manifest.mf for some apache libraries. While I can guess what Export-Package means, I can't find any documentation for these attributes ? Could anyone point me in the right direction. Here.s an example:

    Manifest-Version: 1.0
    Created-By: 1.6.0_07 (Sun Microsystems Inc.)
    Built-By: pemben
    Implementation-Title: Commons BeanUtils
    Implementation-Vendor: The Apache Software Foundation
    Implementation-Vendor-Id: org.apache
    Implementation-Version: 1.8.2
    Specification-Title: Commons BeanUtils
    Specification-Vendor: The Apache Software Foundation
    Specification-Version: 1.8.2
    Export-Package: org.apache.commons.beanutils.locale.converters;
    Private-Package: org.apache.commons.collections;version="1.8.2"
    Ignore-Package: org.apache.commons.collections
    Tool: Bnd-0.0.238
    Bundle-Name: Commons BeanUtils
    Bundle-Vendor: The Apache Software Foundation
    Bundle-Version: 1.8.2
    Bnd-LastModified: 1257775355133
    Bundle-ManifestVersion: 2
    Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
    Bundle-Description: BeanUtils provides an easy-to-use but flexible wra
     pper around reflection and introspection.
    Import-Package: org.apache.commons.beanutils;version="1.8.2"
    Bundle-SymbolicName: org.apache.commons.beanutils
    Bundle-DocURL: http://commons.apache.org/beanutils/