6

我正在查看一些 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/
4

4 回答 4

4

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

这篇 JavaWorld 文章是一个很好的介绍。

于 2009-11-29T20:07:28.127 回答
1

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

于 2009-11-29T20:06:12.660 回答
1

从文件中Export-Package,我猜您正在查看OSGi Bundle

查看 Wikipedia 文章或OSGi 主页了解详细信息。

于 2009-11-29T20:09:03.320 回答
1

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

于 2009-11-30T09:23:12.207 回答