Tuesday, August 18, 2015

More jars on Maven Central and JCenter

In my last blog post, I announced the availability of the Release 6 specifications including their companion code jars which were released to Maven Central and JCenter. Those companion code jars were collections of companion code associated with the specification documents. For example, the osgi.enterprise jar contained all the packages for the all the APIs specified in the OSGi Enterprise specification document. Those jars are meant for compile time use only and are not meant for runtime use by being installed as a bundle in an OSGi framework. In fact, those jars now contain unresolvable requirements to prevent their use at runtime.

But what if you want to use the APIs at runtime? To support using the APIs at runtime, OSGi has now made the companion code for individual specifications available as individual companion code bundles. These bundles are now also available from Maven Central and JCenter. So if, for example, you need the Configuration Admin Service API at runtime (and you are not using a Configuration Admin Service implementation bundle which already exports the API), you can get the org.osgi:org.osgi.service.cm:1.5.0 bundle and install it. Each of the companion code bundles is versioned at the version of the specification they are for. Since the current release of the Configuration Admin Service Specification is version 1.5, that is also the version of its companion code bundle.

There are now individual companion code bundles for all of the specifications in the OSGi Compendium, OSGi Enterprise, and OSGi Residential Release 6 specifications:
org.osgi.application-1.0.0
org.osgi.jmx-1.1.0
org.osgi.namespace.contract-1.0.0
org.osgi.namespace.extender-1.0.1
org.osgi.namespace.implementation-1.0.0
org.osgi.namespace.service-1.0.0
org.osgi.service.application-1.1.0
org.osgi.service.async-1.0.0
org.osgi.service.blueprint-1.0.2
org.osgi.service.cm-1.5.0
org.osgi.service.component-1.3.0
org.osgi.service.component.annotations-1.3.0
org.osgi.service.coordinator-1.0.2
org.osgi.service.dal-1.0.0
org.osgi.service.dal.functions-1.0.0
org.osgi.service.deploymentadmin-1.1.0
org.osgi.service.device-1.1.0
org.osgi.service.dmt-2.0.1
org.osgi.service.enocean-1.0.0
org.osgi.service.event-1.3.1
org.osgi.service.http-1.2.1
org.osgi.service.http.whiteboard-1.0.0
org.osgi.service.io-1.0.0
org.osgi.service.jdbc-1.0.0
org.osgi.service.jndi-1.0.0
org.osgi.service.jpa-1.0.0
org.osgi.service.log-1.3.0
org.osgi.service.metatype-1.3.0
org.osgi.service.metatype.annotations-1.3.0
org.osgi.service.monitor-1.0.0
org.osgi.service.networkadapter-1.0.0
org.osgi.service.prefs-1.1.1
org.osgi.service.provisioning-1.2.0
org.osgi.service.remoteserviceadmin-1.1.0
org.osgi.service.repository-1.1.0
org.osgi.service.resolver-1.0.1
org.osgi.service.resourcemonitoring-1.0.0
org.osgi.service.rest-1.0.0
org.osgi.service.serial-1.0.0
org.osgi.service.serviceloader-1.0.0
org.osgi.service.subsystem-1.1.0
org.osgi.service.tr069todmt-1.0.1
org.osgi.service.upnp-1.2.0
org.osgi.service.usbinfo-1.0.0
org.osgi.service.useradmin-1.1.0
org.osgi.service.wireadmin-1.0.1
org.osgi.util.function-1.0.0
org.osgi.util.measurement-1.0.1
org.osgi.util.position-1.0.1
org.osgi.util.promise-1.0.0
org.osgi.util.tracker-1.5.1
org.osgi.util.xml-1.0.1

Note: the Core API is only available in the osgi.core jar for compile time use since the Core API is exported at runtime by the framework implementation and thus should not be exported by bundles.

3 comments:

  1. This reminds me of one of my emails in the mailing list from 2012: "I would like to make things a bit clearer. I would like to create separate jars that contain only the relevant packages (e.g. osgi-jdbc.jar, osgi-blueprint.jar, ...)". It seems that time solves issues :-).

    ReplyDelete
    Replies
    1. Time... and tools... This was mostly made possible by recent updates to bnd (http://bnd.bndtools.org/instructions/pom.html) to generate proper maven metadata.

      Delete
  2. Is there any special reason why the jpa bundle imports javax.persistence package in version range [1.1,2)? I fail to find a maven osgi bundle satisfying that version...

    ReplyDelete

Blog Archive