UPDATE 2015:
For good repositories for OSGi artifacts also check:
SpringSource Enterprise Bundle Repository
Eclipse Bundle Recipes Project
Here the original post:
Although the onedb libraries are currently deployed as vanilla Java JAR files (onedb downloads), I have used the PDE tooling of eclipse heavily in the development process.
One core advantage of using OSGi in the development process is that OSGi allows to enforce information hiding between modules in a large Java application.
Unfortunately, most open source projects do not provide versions of their libraries, which are ready made for an OSGi environment. There is some great tooling available to create bundles from vanilla Java Jars, my favorite one being the Maven Bundle Plugin, which wraps the BND tool.
However, it can still be an annoyance to create your own OSGi-enabled maven artifacts for every dependency you want to use in your OSGi project.
This is my motivation to publish OSGi wrappers for all the third party dependencies I come across in my projects:
-> osgi-maven on github <-
Basically, these wrappers provided nothing more but a simple pom, which is pre-configured to generate valid OSGi declarations for the wrapped dependency:
If the project is easy to build and/or there is no single artifact available, which could be wrapped, the wrapper might also contain the source code of the third party dependency. Therefore, please make sure that you use all wrappers in accordance with the source code license of the wrapped artifact.
Currently, the wrapper artifacts provide the following key features:
- You can use the artifacts from the provided repository to link the third party project as OSGi-bundles/Maven artifact (see included libraries).
- You can download the projects from the github repository and generate MANIFEST.MF declarations as well as use the maven eclipse plugin to create eclipse projects for the dependencies (this is very useful for eclipse PDE projects).
The following libraries are defined in the repository:
- thrdHamcrestGWT: A wrapper for a variant of the Hamcrest library, which can be deployed as GWT module.
- thrdNetty3: A wrapper for the Netty NIO framework
- thrdAsyncHttpClient17: A wrapper for the async-http-client library
- thrdJavaxMail14: A wrapper for the Java Mail API
- thrdJTidy: A wrapper for the JTidy library (Version 8.0)
- thrdSwingApplicationFramework: A wrapper for the Swing Application Framework
- thrdJenaBean: A wrapper for the jenabean library.
- thrdSwingActionManager: A wrapper for the Swing Action Manager library.
- thrdShef: A wrapper for the SHEF Swing library.
- thrdGWTUser24: A wrapper for the GWT client libraries version 2.4.
- thrdGWTUser: A wrapper for the GWT client libraries version 2.2.0.
- thrdBabuDb05: A wrapper for the BabuDB key-value store.
- thrdJDVM2V22: A wrapper for the jdbm2 key-value store.
- thrdJettison12: A wrapper for the Jettison library.
- thrdDom4j: A wrapper for the dom4j library.
- thrdGwtGxt: A wrapper for the Ext Gwt library.
- thrdApacheVFS: A wrapper for the Apache Commons VFS library.
… and more coming.
Are you still using OSGi these days? The Eclipse Bundle Recipes project is an effort at Eclipse to create a repository for templates for wrapping Maven artifacts with OSGi headers. I’ve recently updated the project to make it easier to create recipes. Contributions are welcome!
Thank you, the Eclipse Bundle Recipes project looks great.
Do you have any pointers to getting started guides and more general info about the projects?
I’ve started to capture the documentation in the README.md (http://git.eclipse.org/c/ebr/org.eclipse.ebr.recipes.git/tree/README.md) and I also gave a session at EclipseCon 2015. The talk has been recorded and should be available within a few weeks (https://www.eclipsecon.org/na2015/session/tasty-recipes-osgi-bundles). Please reach out via the mailing list ebr-dev@eclipse.org for any questions.