Hello

We're using maven to create OSGi Bundles (using the felix plugins). We also have a distribution project which has dependencies to an OSGi container and to the various bundles that are part of the distribution (without transitive dependencies).

One problem is, that the OSGi-container is a real runtime-dependency in that that class has to be in the classpath when the vm is invoked while the required bundles just has to be loaded. What we currently is to use an assembly descriptor which explicitly copies the contained-jars to /lib and copies all other jars to /bundle.

The other issue are transitive dependencies, as long as these dependencies are OSGi bundles they should typically be included, in some cases however we develop against an api that is not by default in a bundle and run the application with a bundle providing the api and its implementation, should the api be in scope provided and the bundle in scope runtime?

The osgi compendium is an example where the "default" artifact is not a bundle:

<dependency>
            <groupId>org.osgi</groupId>
            <artifactId>osgi_R4_core</artifactId>
            <version>1.0</version>
</dependency>

but the same is available as bundle in another artifact

<dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.osgi.compendium</artifactId>
            <version>1.0.1
</dependency>

While just using the second dependency works in this case, it would be good to have more general mechanism to distinguish runtime-dependencies from (suggested) bundles. Also it would be good to have a mapping from non-bundle artifacts to bundle-artifacts providing these packages.


I'm curios to know how other are handling this.

Cheers,
reto

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to