【问题标题】:What does Tool/Bundle-Name/Export-Package etc. mean in a jar manifestTool/Bundle-Name/Export-Package 等在 jar 清单中是什么意思
【发布时间】:2010-12-21 10:58:18
【问题描述】:

我正在查看一些 apache 库的 manifest.mf。虽然我可以猜到 Export-Package 的含义,但我找不到这些属性的任何文档?谁能指出我正确的方向。 这是一个例子:

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/

【问题讨论】:

    标签: java jar osgi manifest


    【解决方案1】:

    如果您想真正了解 OSGi Manifest 条目的含义,我强烈建议您阅读specification。它不是很长,并且会详细解释您想知道的所有内容。另外,请记住 Manifest.mf 文件不是特定于 OSGi 的;其他 Java 库也使用它。因此,并非您在上面看到的所有条目都是由 OSGi 规范定义的,例如 Bnd utility 添加的“Tool”和“Bnd-LastModified”。

    【讨论】:

      【解决方案2】:

      Export-Package 归档,我猜您正在查看OSGi Bundle

      查看维基百科文章或OSGi homepage了解详情。

      【讨论】:

        【解决方案3】:

        Bundle 属性定义了 info wrt。 OSGi 捆绑。 OSGi 包只是一个 .jar 文件,它还定义(通过属性)它导出的内容,以及它的依赖项(包括版本)。请注意,.jar 文件可以用作标准 .jar 文件 - 捆绑信息仅在 OSGi 容器中使用。

        This JavaWorld article 是一个很好的介绍。

        【讨论】:

          【解决方案4】:

          这是 OSGi。 Eclipse 使用它,也是 nutch。

          【讨论】:

            猜你喜欢
            • 2019-12-26
            • 1970-01-01
            • 2011-09-29
            • 1970-01-01
            • 2023-01-23
            • 2013-05-07
            • 2016-12-22
            • 2010-11-16
            • 1970-01-01
            相关资源
            最近更新 更多