Tuesday, February 28, 2017

OSGi API Snapshots are Live!

Sometime back, OSGi began to make all design document (RFC) drafts available in real time from the OSGi Design GitHub repository. In furtherance of providing real time access to the latest design work at OSGi, OSGi made a change to the OSGi build process. Previously, the various OSGi specification's API code had only been published by the Alliance once a specification release has been declared final. Since mid February, however, the OSGi build has been publishing API snapshots to the public https://oss.sonatype.org/content/repositories/osgi/ group repository! Many thanks to BJ Hargrave for making this happen.

So why should you care?

Broadly speaking, the people who care about the pre-release OSGi APIs fall into two sets:
  1. The people who want to try out the new draft APIs in their applications.
  2. The people who want to implement the new draft APIs.
At first glance, it looks like the new release policy only helps the second group - after all it saves them from some issues
  • How do I keep up to date with the OSGi RFCs?
  • Is there a way to avoid duplicating the OSGi draft API source code?
But actually there are two important ways that publishing snapshots directly helps users:
  1. By making it easier for implementors to keep up to date with RFCs, users get faster access to new implementations of the draft API.
  2. For implementation code published by the OSGi Alliance, you get access to the draft code right now!
A good example of this would be OSGi Push Streams. You may have already watched the talk I gave in Portland about them, and been wondering when you could try them out. The answer is right now, and the same is true for the new 1.1 version of OSGi Promises!

Helping implementors

Open Source implementations of OSGi specifications are already moving to use the new draft API snapshots from OSGi (for example the Aries JAX-RS whiteboard). In most cases the API can be simply referenced from the OSGi group repository and no further action is needed.

One thing worthy of note is that the latest OSGi APIs are all compiled using Java 8. For some implementations, this is a problem as they wish to include the API inside their bundle but also to be usable on older versions of Java. In these cases, implementors may wish to try using a tool such as the Retrolambda project, so that they can still benefit from the published snapshots.

We hope that you enjoy the chance to play with all the cool new specifications!


  1. Damn 10 years!
    But it is a very nice step forward. Go OSGi, it's time to rule that Java EE world!

    1. Rule the dying world? You must be a necromancer.