OSGi Import-Package:我收到了错误的包吗?

时间:2014-09-10 15:16:49

标签: dependencies osgi apache-felix equinox osgi-bundle

我正在尝试使用OSGi捆绑包,但它仍处于“已安装”状态且无法解决。当我尝试启动它时,我收到以下消息:

org.osgi.framework.BundleException: Could not resolve module: org.apache.felix.gogo.usocklistener [6]
    Unresolved requirement: Import-Package: org.osgi.service.command; version="0.7.0.SNAPSHOT"

这是我目前的捆绑列表:

START LEVEL 6
   ID|State      |Level|Name
    0|Active     |    0|OSGi System Bundle (3.10.100.v20140909-1519)
    1|Active     |    4|OSGi Release 4.2.0 Services (3.4.0.v20140909-1519)
    2|Active     |    4|OSGi Release 4.2.0 Utility Classes (3.3.0.v20140909-1519)
    3|Active     |    4|Apache Felix Gogo Command (0.14.0)
    4|Active     |    4|Apache Felix Gogo Runtime (0.12.1)
    5|Active     |    4|Apache Felix Gogo Shell (0.10.0)
    6|Installed  |    4|Apache Felix Gogo USockListener (1.0.0.SNAPSHOT)
    7|Installed  |    4|Apache Felix Web Management Console (4.2.3.SNAPSHOT)
    8|Active     |    4|Apache Felix Configuration Admin Service (1.8.1.SNAPSHOT)
    9|Active     |    4|Apache Felix EventAdmin (1.3.2)
   10|Active     |    4|Console plug-in (1.1.100.v20140828-1547)
   11|Active     |    4|Log Service Bundle (1.2.300.v20140828-1634)
   12|Active     |    4|Http Services Servlet (1.1.500.v20140909-1612)
   13|Installed  |    4|Jetty Http Service (3.0.200.v20140828-1634)
   15|Active     |    4|servlet-api bundle (2.4.0.SNAPSHOT)

所以,显然我需要org.osgi.service.command捆绑,至少为v0.7.0(它至少是“,而不是”完全“,对吧?)。但我有org.eclipse.osgi.services-3.4.0捆绑,并且它是活跃的。如果那不包含我需要的命令包,那么我不知道在哪里看。

org.eclipse.osgi.services-3.4.0是否包含org.osgi.service.command?如果没有,我在哪里可以找到org.osgi.service.command(最好是源形式而不是二进制形式)?

1 个答案:

答案 0 :(得分:3)

要查找包裹:

结果如下:http://search.maven.org/#search%7Cga%7C1%7Cfc%3A%22org.osgi.service.command%22

根据结果,您可以找到原始项目,也可以下载源jar。