简体   繁体   中英

Apache Felix mvn package

To add a dependency on Apache Felix, I was considering the following.

    <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. My understanding was that the latter was packaged by the OSGi Alliance. Is Felix directly using the Alliance bundled packages or has the Alliance adopted Felix? I am a little confused. What is the right way to include Apache Felix OSGi core package in a POM file?

The OSGi alliance defines the specification and Apache Felix as well as other OSGi frameworks implement them. So the correct way is indeed to depend on the jar from the OSGi alliance.

Your bundle should then work with any framework that implements the spec you compile against.

For a small example see osgi-ds-hello-world .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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