OSGi Bundle Repositories (How to host them on a Server)?

osgi

Solution

Your understanding is exactly right. The main thing to watch out for when using OBR is that the XML format changed a lot when the soecification was finalised. Sometimes 'OBR support' means the old style, and sometimes the new style. As long as client and server are consistent, either should be fine. The new format is richer, but at the moment there's wider support for the old style.

To set up your own http hosting, you can use repoindex (formerly known as bindex). Apache Aries also has a repository generation tool.

Using the 'index' goal with the maven bundle plugin will generate OBR metadata, and bnd can also be directly configured to generate the repository.xml.

Finally, if you don't want to manage the http server directly, Nexus and Karaf Cave provide OBR repository hosting.

You may also find this question helpful: OSGI OBR repository hosting?

Problem

I would like to ship a product that is merely a configured OSGi container. When the container is launched it should, based on the configuration of the container, download and install the application - the most recent bundle(s) which comprise all the functionality of the application. When a newer version of the application becomes available I would like the application to automatically download and update/install the newer versions of the bundles so it appears seamless to the end user. Based on the Motivation section of the Apache Felix OSGi Bundle Repository documentation (which is currently outdated) I think this is the purpose of OBR. Is that correct? If not then what solutions exist for this scenario? If so: What does an OBR repository look like? I envision it to look somewhat like a maven repository that is accessible via the Internet with an XML file that describes the available bundles in the repository. How does one manage a repository that can be accessed from the Internet? The aforementioned documentation states that: An OBR "repository server" is not necessary, since all functionality may reside on the client side. But I assume that there does exist some "OBR repository server" for those repositories that should be accessible from the Internet. In this example situation, I would rather that the repository does not sit on the client side, but on a server so clients can be easily updated. To accomplish this, would I just set up an HTTP server that hosts 1) some xml file that describes the bundles available in the repository, and 2) the bundles? Lastly, is there a simple example somewhere that demonstrates how all this works together?

Original source

Related problems