Thank you all for your responses. I hope I can resolve this today. Unfortunately, I cannot use Maven as the build tool, as much as I'd like to. I have to use Gradle.
I did try making the 3rd party library an osgi bundle using Peter Kriens bnd tool. But I still get a ClassNotFoundException when running the application. I put an example project on GitHub to demonstrate what the problem is. I did search the Spring OBR here<http://ebr.springsource.com/repository/app/bundle?query=M>but the library is not to be found. This is the first time I've heard of the servicemix project. It looks interesting and worth more investigation, but I didn't find anything about the particular jar I'm looking for. I'm looking for "com.miglayout:miglayout-javafx:4.2". I installed servicemix and in the console used feature:list. I saw a bunch of bundles but didn't find what I'm looking for. On Sun, Nov 10, 2013 at 2:47 AM, Daniel McGreal <[email protected]> wrote: > Also, the Spring EBR? > > On 10 Nov 2013, at 08:36, Achim Nierbeck <[email protected]> wrote: > > > Hi, > > > > Just as a little hint, you might want to check the servicemix project, > > because it already converted lots of 3rd party projects. It might happen > > that it's already available as osgi bundle. Besides that the servicemix > > project does use the maven shade plugin for conversion. > > > > Regards, Achim > > > > sent from mobile device > > Am 10.11.2013 00:33 schrieb "Henry Saginor" <[email protected]>: > > > >> 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 < > >> [email protected]> 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: [email protected] > >> For additional commands, e-mail: [email protected] > >> > >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >

