Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create OSGi bundle from jar library?

Tags:

How to create OSGi bundle from jar library?

like image 966
EK. Avatar asked Aug 29 '10 08:08

EK.


2 Answers

In case you are using eclipse: There is a wizard for that.

It allows you to select a number of jar libraries and creates a plug-in project (i.e. OSGi bundle) including these jars.

You can find it here:

File -> New -> Other ... -> Plug-in from Existing jar Archives. 

alt text

like image 168
wwerner Avatar answered Oct 21 '22 09:10

wwerner


In principle you just need to add OSGi metadata to the manifest

There is a bundle creator for eclipse which gives a very practical way to add these entries which should be part of the Plugin Dev Toolkit.

Here is an article detailing the process and how to do it with the Bnd tool, maven and so forth.

I personally like the pax tools very much. It is all command line based, but very practical. To create an OSGi bundle of an existing jar you can use bnd tool.

like image 29
Peter Tillemans Avatar answered Oct 21 '22 10:10

Peter Tillemans