将OSGI捆绑包导入eclipse [英] Importing an OSGI bundle into eclipse

查看:94
本文介绍了将OSGI捆绑包导入eclipse的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试将这个OSGI软件包[2] enj-library导入到eclipse中(用Maven编译后),我使用了: 文件>导入...>插件开发>插件和片段"

I try to import this OSGI bundle [2]enj-library into eclipse (after compiling it with Maven) , I used: "File > Import...> Plug-in Development > Plug-ins and fragments"

然后我导入了二进制文件

and I imported the binary

但是我得到了以下未解决的依赖项:

but I got the following unresolved dependencies:

在pom.xml中提到了这些依赖项:

These dependencies were mentionned in pom.xml:

<plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <version>1.2.1</version>
            <extensions>true</extensions>
            <configuration>
                <manifestLocation>META-INF</manifestLocation>
                <instructions>
                    <Import-Package>!org.junit.*,
                        !org.reflections.*,!it.polito.elite.enocean.*,*,com.google.common.base;version="14.0", com.google.common.collect;version="14.0"</Import-Package>
                    <Export-Package>it.polito.elite.enocean.enj.*,
                        it.polito.elite.enocean.protocol.*</Export-Package>
                    <Private-Package>it.polito.elite.enocean.test</Private-Package>
                    <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
                    <Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>
                    <Embed-Dependency>org.reflections.*;scope=compile|runtime;inline=false</Embed-Dependency>
                    <Embed-Directory>target/dependency</Embed-Directory>
                    <Embed-StripGroup>true</Embed-StripGroup>
                </instructions>
            </configuration>
        </plugin>

我该如何解决未解决的依赖性问题? 非常感谢您的帮助!

How can I solve this issue of unresolved dependencies? Thanks a lot for your help!

[2] https://github.com/dog-gateway/enj-library

推荐答案

您还需要安装将这些软件包导出到目标平台的捆绑软件.

You will need to also install bundles that export these packages into your target platform.

这篇关于将OSGI捆绑包导入eclipse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆