felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henry Saginor <hsagi...@gmail.com>
Subject Re: How to use a 3rd party non-OSGi dependency?
Date Sat, 09 Nov 2013 23:33:08 GMT
Hi Elliot,

There are several option. I think the "best way" really depends on your use case. If you have
one bundle where your code depends on 3rd party jar you can add it as embeded dependency.
I usually prefer this approach. If you use maven as your build system this can be added with
maven-bundle-plugin and <Embed-Dependency> instruction. 

It's also pretty simple to convert 3r party jars into OSGi bundles by adding OSGi headers
to it's manifest file. It depends on your 3rd party licensing if you can change their jars
though. You can also export embedded packages from your bundle if other bundles need them.
But I am not sure if this is considered best practice since it obfuscates versioning of your
3rd party library. It's an option though if you don't care about this.

There are some other options like boot delegation. But that's normally used for system level
libraries.

 http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html

Henry

On Nov 9, 2013, at 10:32 AM, Elliot Huntington <elliot.huntington@gmail.com> wrote:

> What is the best way to convert a 3rd party jar into an OSGi bundle?
> 
> http://stackoverflow.com/questions/19880211/how-to-convert-miglayout-for-javafx-to-an-osgi-bundle-so-it-will-work-inside-an


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message