简体   繁体   English

制作jar OSGi捆绑包是什么意思

[英]What does it mean to make a jar OSGi bundle

I am using a lib that has the following in the POM: 我正在使用在POM中具有以下内容的库:

<!-- Plus, let's make jars OSGi bundles as well  -->
        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <extensions>true</extensions>
          <configuration>
            <instructions>
              <Bundle-Name>${project.name}</Bundle-Name>
              <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
              <Bundle-Description>${project.description}</Bundle-Description>
              <Import-Package>
javax.xml.namespace, javax.xml.parsers, javax.xml.stream, javax.xml.stream.util,
javax.xml.transform, javax.xml.transform.dom, javax.xml.transform.sax, javax.xml.transform.stream,
org.codehaus.stax2, org.codehaus.stax2.io, org.codehaus.stax2.ri, org.codehaus.stax2.typed,
org.codehaus.stax2.validation,
org.codehaus.stax2.ri.dom, org.codehaus.stax2.ri.evt, org.codehaus.stax2.ri.typed,
org.w3c.dom,
org.xml.sax, org.xml.sax.ext, org.xml.sax.helpers
</Import-Package>
              <DynamicImport-Package>
</DynamicImport-Package>
              <Private-Package>
</Private-Package>
              <Export-Package>
com.fasterxml.aalto*
</Export-Package>
            </instructions>
          </configuration>
        </plugin>

I wonder what is the implication for the application using it? 我想知道使用它的应用程序意味着什么?

What does it mean to be OSGi bundle? OSGi捆绑意味着什么?

It is an xml library faster xml aalto. 这是一个更快的xml aalto的xml库。

A jar being an OSGI bundle means it is ready to be used in OSGI containers. 罐子是OSGI捆绑包,意味着它可以在OSGI容器中使用。 a jar with the bundle information in the manifest file becomes an OSGI bundle. 清单文件中包含捆绑软件信息的jar成为OSGI捆绑软件。 The pom plugin above will generate the meta information that specifies what packages in this jar are exported and what are imported and much more. 上面的pom插件将生成元信息,该信息指定导出此jar中的哪些软件包以及导入哪些内容等等。 An OSGI bundle can be generated from a jar using offline tool such as bnd. 可以使用脱机工具(如bnd)从jar中生成OSGI捆绑包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM