1

我对 OSGi enRoute 和 BndTool 实现应用程序的概念很感兴趣。但是我在尝试使用 Blueprint Gemini 时遇到了困难。请有人帮助我。

问题

如何使用 Blueprint Gemini 2.0.0 运行基于 BndTools 的 OSGi 应用程序?

我的问题

  • 我想在基于 BndTools 的 OSGi 应用程序中使用 Blueprint Gemini 2.0.0。但是我的 OSGi 包没有得到解决。
  • 尝试自动解决时显示此错误消息:

缺少需求 &(osgi.extender=osgi.blueprint)(version=[1.0.0,2.0.0))

  • 我想知道为什么我的捆绑包需要版本 <=1.0.0 和 <2.0.0?这没有在我的项目的任何配置文件中指定(在 *.bnd 和 *.bndrun 文件中都没有)?

我的项目是如何设置和配置的

  • 使用 BndTools 3.3,我在 Eclipse Neon 中创建了一个新的“Bnd OSGi 项目”并选择“OSGi enRoute 3.3.0”作为项目模板。
  • OSGi 框架:org.eclipse.osgi;version='[3.10...]

  • 对于项目名称,选择了后缀“应用程序”。*然后我添加了一个 blueprint.xml。

  • 在 *.bndrun 文件中,我添加了两个包作为“运行要求”:

    • 我的捆绑包和
    • org.eclipse.gemini.blueprint.extender。在 *.bndrun 文件中,我添加了两个包作为“运行要求”:我的包和 org.eclipse.gemini.blueprint.extender:blueprint.extender 包已使用以下 Maven XML 语法添加到我的 Central 存储库中:

    <dependency> <groupId>org.eclipse.gemini.blueprint</groupId> <artifactId>gemini-blueprintextender</artifactId> <version>2.0.0.RELEASE</version> </dependency>

4

0 回答 0