代码之家  ›  专栏  ›  技术社区  ›  leeeroy

JAR清单中的工具/包名称/导出包等是什么意思?

  •  5
  • leeeroy  · 技术社区  · 16 年前

    我正在查看manifest.mf中的一些Apache库。虽然我可以猜出导出包的含义,但我找不到这些属性的任何文档?有人能给我指个方向吗? 举个例子:

    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/
    
    4 回复  |  直到 13 年前
        1
  •  4
  •   Brian Agnew    16 年前

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

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

        2
  •  1
  •   bmargulies    16 年前

    这是 奥斯吉 . Eclipse使用它,也使用Nutch。

        3
  •  1
  •   Joachim Sauer    16 年前

    Export-Package 归档,我想你在看 OSGi Bundle .

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

        4
  •  1
  •   omerkudat    13 年前

    如果您想对OSGi清单条目的含义有很好的解释,我强烈建议您阅读 specification . 时间不长,你想知道的都会详细解释。此外,请记住,Mut.Mf文件不是针对OSGi的;其他Java库也使用它。因此,上面看到的不是所有条目都是由OSGi规范定义的,例如“tool”和“bnd lastmodified”,它们是由 Bnd utility .

    推荐文章