简体   繁体   English

Apache Felix OSGI无法导出软件包

[英]Apache felix osgi unable to export package

I have below set up in manifest.mf file, 我在manifest.mf文件中设置了以下内容,

    Manifest-Version: 1.0
Bnd-LastModified: 1359719312904
Bundle-Activator: org.amdatu.mongo.impl.Activator
Bundle-ManifestVersion: 2
Bundle-Name: org.amdatu.mongo
Bundle-SymbolicName: org.amdatu.mongo
Bundle-Version: 1.0.4
Created-By: 1.7.0_09 (Oracle Corporation)
Export-Package: org.amdatu.mongo;uses:="com.mongodb";version="1.0"
Import-Package: com.mongodb,org.amdatu.mongo;version="[1.0,2)",org.apach
 e.felix.dm;version="[3.0,4)",org.osgi.framework;version="[1.5,2)",org.o
 sgi.service.cm;version="[1.3,2)",org.osgi.service.log;version="[1.3,2)"
Private-Package: org.amdatu.mongo.impl
Tool: Bnd-1.51.0

When I install this bundle I am not getting org.amdatu.mongo package in export list in apache felix? 安装此捆绑软件时,我在apache felix的导出列表中没有得到org.amdatu.mongo软件包吗? Please check the image below ...my bundle is in active plus running state.Still I am not able to see export package?? 请检查下面的图片...我的捆绑包处于活动加运行状态。仍然看不到导出包?

在此处输入图片说明

I have no package with ID 508 from which this bundle importing the org.amdatu.mongo 我没有ID 508的软件包,该软件包从中导入org.amdatu.mongo

I have search in web console and I got only one bundle.Please check the image below, 我在网络控制台中进行了搜索,但只有一个捆绑包。请查看下面的图片,

在此处输入图片说明

The problem is not that Felix is unable to export the package. 问题不在于Felix 无法导出软件包。 It just doesn't need to. 只是不需要。

You have listed the package org.amdatu.mongo as both an export and an import. 您已将org.amdatu.mongo包列为导出和导入。 This gives the OSGi Framework a choice: import it if there is an another bundle already exporting it; 这给了OSGi Framework一个选择:如果已经有另一个捆绑软件将其导出,则将其导入; otherwise, export it. 否则,将其导出。

So in other words you are seeing normal, correct behaviour. 换句话说,您看到的是正常,正确的行为。

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

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