简体   繁体   English

Apache Felix mvn 包

[英]Apache Felix mvn package

To add a dependency on Apache Felix, I was considering the following.为了添加对 Apache Felix 的依赖,我考虑了以下内容。

    <dependency>
        <groupId>org.apache.felix</groupId>
        <artifactId>org.osgi.core</artifactId>
        <version>1.4.0</version>
    </dependency>

However, when I checked the corresponding maven repository for a higher version, I found that the artefact has moved to org.osgi » org.osgi.core.但是,当我检查相应的maven存储库以获得更高版本时,我发现artefact已移动到org.osgi»org.osgi.core。 My understanding was that the latter was packaged by the OSGi Alliance.我的理解是后者是由 OSGi 联盟打包的。 Is Felix directly using the Alliance bundled packages or has the Alliance adopted Felix? Felix 是直接使用联盟捆绑包还是联盟采用了 Felix? I am a little confused.我有点困惑。 What is the right way to include Apache Felix OSGi core package in a POM file?在 POM 文件中包含 Apache Felix OSGi 核心包的正确方法是什么?

The OSGi alliance defines the specification and Apache Felix as well as other OSGi frameworks implement them. OSGi 联盟定义了规范,Apache Felix 以及其他 OSGi 框架实现了它们。 So the correct way is indeed to depend on the jar from the OSGi alliance.所以正确的方法确实是依赖OSGi联盟的jar。

Your bundle should then work with any framework that implements the spec you compile against.然后,您的包应该与实现您编译的规范的任何框架一起使用。

For a small example see osgi-ds-hello-world .有关一个小示例,请参阅osgi-ds-hello-world

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

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