bnd

What does the private-package manifest header do?

天涯浪子 提交于 2019-12-04 01:51:18
I am familiar with Import-Package and Export-Package , but this is a new one for me. What does it do? At runtime in the OSGi container it does nothing. In fact, it's not even mentioned in the OSGi specification (I checked R4). However, it can be specified in a .bnd file for use by bnd at build time. If so, it can be used to determine what goes into the bundle. When bnd builds a bundle, it automatically determines which classes need to go into the bundle. All the classes in packages that are exported are included, and all the classes that they depend on (transitively) are included too. This

Continuous deployment of OSGi-based application on jenkins

自古美人都是妖i 提交于 2019-12-03 00:08:19
After spending a couple of hours trying to understand how to make continuous deployment work in the case of an OSGi-based application , I am finally posing my first question on stackoverflow, hoping for some indications on what I might have done wrong or missed - somehow I feel being on the wrong track... This is what I want to achieve: build some bundles and install them to the maven repository (no problem here, using bnd) now having all the bundles making up my application (passing all tests and so on), I want to deploy and run the application, that is, start some OSGi framework using those

How to add Import-Package instructions for runtime dependencies?

僤鯓⒐⒋嵵緔 提交于 2019-12-01 04:36:25
I'm building an OSGi jar using Gradle, and I'm having a bit of trouble with the manifest. Here's an excerpt from my build script: apply plugin: 'java' apply plugin: 'osgi' jar { baseName = 'awesome' manifest { name = 'An Awesome Application' symbolicName = 'com.example.awesome' // instruction 'Import-Package', 'org.springframework.orm' } } Using the above, Gradle detects my dependencies and adds an Import-Package with all my compile-time dependencies. But say my application has a runtime dependency on org.springframework.orm as well, how do I tell Gradle to include that as an argument in

How do you deserialize an object from bytes in osgi

拜拜、爱过 提交于 2019-12-01 03:29:37
In my osgi application I have three bundles, travel.api , table.api and utils . travel.api depends on table.api which depends on utils . Note that travel.api doesn't directly depend on utils . I use aQute Bnd to generate the manifests and I believe it is working fine. The manifests are displayed below. There is a class called PageData that has a field of type TableData , which in turn has a field of type TestObject . PageData is located in travel.api , TableData is located in table.api and TestObject is located in utils . This all works fine when the bundles are loaded. The problem comes when

How to add Import-Package instructions for runtime dependencies?

跟風遠走 提交于 2019-12-01 02:39:52
问题 I'm building an OSGi jar using Gradle, and I'm having a bit of trouble with the manifest. Here's an excerpt from my build script: apply plugin: 'java' apply plugin: 'osgi' jar { baseName = 'awesome' manifest { name = 'An Awesome Application' symbolicName = 'com.example.awesome' // instruction 'Import-Package', 'org.springframework.orm' } } Using the above, Gradle detects my dependencies and adds an Import-Package with all my compile-time dependencies. But say my application has a runtime

How to convert jar to OSGi bundle using eclipse and bndtools

风格不统一 提交于 2019-11-27 20:16:04
I am looking for a step by step guide to convert jar into an OSGi bundle using the eclipse bndtools plugin. I know it is possible to do it with bnd using the command line but would be nice to know how to do the same via the IDE. I might be missing something but this tutorial only explains how to create a project from scratch. Follow the article Create Eclipse plugins (OSGi bundles) from standard jar to achieve this. Though this approach does not use Bnd, but you would be able to achieve what you want. In short you can do following: Create a new Plugin project by selection File-> New -> Project