Questions tagged [bnd]

BND is a Java tool for automated building bundles for an OSGi environment.

196 questions
16
votes
1 answer

Maven Bundle Plugin: Export has private references

After updating the maven-bundle-plugin from version 2.3.5 to version 2.4.0 running mvn clean install outputs some warning messages, which I don't fully understand. E.g. Export ch.entwine.weblounge.contentrepository.impl.index, has 1, private…
Basil
  • 638
  • 1
  • 9
  • 16
15
votes
3 answers

What does the private-package manifest header do?

I am familiar with Import-Package and Export-Package, but this is a new one for me. What does it do?
Midhat
  • 17,454
  • 22
  • 87
  • 114
14
votes
3 answers

How to convert jar to OSGi bundle using eclipse and bndtools

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…
Joly
  • 3,218
  • 14
  • 44
  • 70
9
votes
1 answer

In bndtools, what causes a Require-Capability header for execution environment to be generated?

I have the following bnd file: Bundle-Version: 1.0.12 Bundle-Activator: a.b.Activator Private-Package: a.b -buildpath: osgi.core;version=4.3.0,\ org.apache.felix.bundlerepository;version=1.6.6,\ osgi.cmpn;version=4.3.0.201111022214 -sources:…
Dan Gravell
  • 7,855
  • 7
  • 41
  • 64
9
votes
3 answers

How do you deserialize an object from bytes in osgi

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…
Boomah
  • 1,172
  • 13
  • 24
9
votes
1 answer

Providing DI methods in abstract classes

In most cases I have a lot of components which are having the same classes to be injected by an OSGi Declarative Service. The services will be used to execute some logic which is the same for all derived components. Therefore to avoid duplicated…
christian.vogel
  • 2,117
  • 18
  • 22
9
votes
4 answers

Continuous deployment of OSGi-based application on jenkins

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…
evandor
  • 799
  • 1
  • 10
  • 23
8
votes
2 answers

Embed thirdparty JAR using BND

I have an OSGi bundle that is built using ANT and the classic BND tool. My bundle uses a library (JAR) internally, which is not available as a bundle within my OSGi container (Apache Felix). So, I am trying to embed it within my bundle, for access…
Saket
  • 45,521
  • 12
  • 59
  • 79
8
votes
1 answer

Maven-bundle-plugin: osgi.ee=UNKNOWN

When building my OSGi bundles with JDK 10, maven-bundle-plugin (3.5.1) generates the following manifest attribute: Require-Capability: osgi.ee;filter:="(osgi.ee=UNKNOWN)" This fails runtime: Unresolved requirements: [[com.mycompany.mybundle [1](R…
gjoranv
  • 4,376
  • 3
  • 21
  • 37
8
votes
2 answers

How to include resource file into osgi bundle from jar dependency with bnd/maven-bundle-plugin?

I'm using maven-bundle-plugin (bnd effectively). It's straightforward to include a resource file from sources. For example, a resource file (src/main/resources/some.xml) is moved under target directory (target/classes/some.xml) during build time and…
uvsmtid
  • 4,187
  • 4
  • 38
  • 64
8
votes
2 answers

Why does bnd add a uses directive for a package used only within a method body?

I have a project with a single source file, listed here in its entirety: package com.acme.el; public class ExpressionUtils { public static Object evaluate() { new org.apache.commons.el.ExpressionEvaluatorImpl(); return null; …
Emil Lundberg
  • 7,268
  • 6
  • 37
  • 53
7
votes
1 answer

How to add Import-Package instructions for runtime dependencies?

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…
Emil Lundberg
  • 7,268
  • 6
  • 37
  • 53
7
votes
1 answer

How to OSGIfy a library

I'm working on a project, it's integration project, we are using Apache Camel and Apache Karaf. In the project, I need to use the Jira REST Java client library. So I've read quite a lot of various articles and threads about how to wrap non-OSGI…
stibi
  • 1,013
  • 13
  • 24
6
votes
1 answer

How to embed a maven dependency with bnd-maven-plugin

I am moving from maven-bundle-plugin which provided the "convenient" configuration using Embed-Dependency, but it appears i need to specify my Embed Dependency "manually" in bnd format when using the bnd-maven-plugin. I added the same bundle headers…
empire29
  • 3,729
  • 6
  • 45
  • 71
6
votes
1 answer

How to replace the BndTools default launcher and change the export file structure

I'm using BndTools (http://bndtools.org/) to develop an OSGI application. Everything is working fine but I have some things I would like to change while exporting my app. I'm trying to achieve two things (I think they may be related): 1: Replace…
Robert Koszewski
  • 583
  • 1
  • 8
  • 17
1
2 3
13 14