【问题标题】:Importing an OSGI bundle into eclipse将 OSGI 包导入 Eclipse
【发布时间】:2015-06-18 14:19:58
【问题描述】:

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

我导入了二进制文件

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

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>

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

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

【问题讨论】:

    标签: java eclipse maven dependency-management osgi-bundle


    【解决方案1】:

    您还需要安装将这些包导出到目标平台的包。

    【讨论】:

    • 前两个包的问题解决了,找不到最后一个“gnu.io version 0.0.0”
    • 最后一个需要 rxtx java 库,所以我尝试将它打包成一个包,但没有成功,我开始了一个新线程:stackoverflow.com/questions/30936314/…
    猜你喜欢
    • 2016-09-15
    • 2017-04-07
    • 2023-04-08
    • 2017-12-14
    • 1970-01-01
    • 2018-12-28
    • 2011-11-25
    • 2012-10-11
    • 1970-01-01
    相关资源
    最近更新 更多