Questions tagged [maven-bundle-plugin]

Maven Bundle Plugin provides a maven plugin that supports creating an OSGi bundle from the contents of the compilation classpath along with its resources and dependencies.

The way BND works is by treating your project as a big collection of classes (e.g., project code, dependencies, and the class path).

The way you create a bundle with BND is to tell it the content of the bundle's JAR file as a subset of the available classes.
This plugin wraps BND to make it work specifically with the Maven 2 project structure and to provide it with reasonable default behavior for Maven 2 projects.

Check the official simple example for a first look at this plugin.

More info

133 questions
5
votes
2 answers

Embedding Transitive Dependencies in OSGI

I have an OSGI bundle that has a dependency on a 3rd Party library, I don't want to deploy that library in the container, I'd rather embed it in my bundle. Of course, that library has its own dependencies, I want to embed them as well. I'm using the…
isco
  • 350
  • 4
  • 15
5
votes
1 answer

OSGi:export a package without exporting a few Classes within the same package

I am working in a OSGi project where we need to export a package in bundle but we do not want to export a two specific class of this bundle. To give more background, we use a third party jar that is not osgi bundle so we add this as a part of OSGi…
Leo Prince
  • 940
  • 2
  • 14
  • 33
5
votes
3 answers

Maven bundle plugin - How to add main class

I have a Maven project mjbean which has only one dependency: TestA. Here is the pom.xml for mjbean: com.mbean mjbean 0.0.1-SNAPSHOT bundle
Li'
  • 3,133
  • 10
  • 34
  • 51
4
votes
1 answer

Override Require-Capability in Maven-Bundle-Plugin

My question is similar to this one but I am using the Maven bundle plugin to achieve the same end result. I am building a bundle that contains a persistence.xml file and I have found that the maven-bundle-plugin automatically generates the following…
D-Dᴙum
  • 7,689
  • 8
  • 58
  • 97
4
votes
2 answers

Unresolved requirement: osgi.component

I'm trying to develop onto Karaf an OSGi WAB containing a REST API and a call from a custom-made service. However, for some weird reason, the OSGi framework complains about an unsatisfied capability, osgi.component. I would like to know: How can I…
Koldar
  • 1,317
  • 15
  • 35
4
votes
2 answers

OSGI bundle of JARs with maven-bundle-plugin

I am trying to embed some JARs into an OSGI bundle which do not have a corresponding OSGI bundle so that other OSGI bundles can reference them. I have followed many suggestions but nothing worked. My last attempt is based on: for…
OSGI Java
  • 545
  • 7
  • 21
4
votes
3 answers

OSGI bundle dependencies

I have created an bundle which relies on SLF4J and as such am using Logback for the OSGI implementation. This all bundles up and installs OK but when I come to start the bundle I get the following exception: org.osgi.framework.BundleException:…
timothyclifford
  • 6,799
  • 7
  • 57
  • 85
4
votes
3 answers

When using "bundle" packaging with maven-bundle-plugin goals are executed twice

I have a (simple) maven project with packaging type "bundle" using org.apache.felix:maven-bundle-plugin:2.5.4. It produces a correct OSGI bundle jar. However i observe that all goals are executed at least twice. How do i prevent this? Problem is…
rmuller
  • 12,062
  • 4
  • 64
  • 92
4
votes
0 answers

OSGI Bundle, maven-bundle-plugin, signed JARS

I'm using the maven-bundle-plugin to build an OSGIed version of a bunch of Jar files, some of which are signed. This seems to create a problem later on in my build, with the following error message. Exception in thread "main"…
Ren
  • 3,395
  • 2
  • 27
  • 46
4
votes
1 answer

Can't get rid of Split package, multiple jars provide the same package

I have main project (projectA), which has a library depencency (projectB), both has package.subpackage in them. I would like to inline the library in the main project. Main project configuration is quite simple (in addition the the depencency listed…
Wojtek
  • 1,845
  • 1
  • 14
  • 33
4
votes
1 answer

how to include third parties library in maven-bundle-plugin(v2.3.7)

I am using servicemix(v4.5.3) and want to deploy my application(depends upon hundreds of third party library) as bundle via maven-bundle-plugin. Below is my pom.xml org.apache.felix
4
votes
0 answers

OSGI Bundle Repository (OBR) capability conflicts during OBR resolution in Apache Felix

I'm investigating the use of OBR in Felix as a deployment option for a large application, but have encountered some initial hurdles. Approach Taken I created a new jar with a manifest.mf listing every single application dependency(basically…
cjbooms
  • 163
  • 8
4
votes
2 answers

How to use bnd directives from maven-bundle-plugin?

How can I use bnd directives instruction from maven-bundle-plugin? bnd directives are starting with a '-' character, and this is an invalid xml tag: <-foo>bar I have checked the official page for maven-bundle-plugin, and they said that it…
ceilfors
  • 2,617
  • 23
  • 33
4
votes
1 answer

How to include a jar of dependency in an OSGi bundle using maven bundle plugin?

I have an OSGi compliant bundle(jar), in which I want to add a jar of a dependency. The dependecy I want to add is of a Database Driver. That jar is not present in the lib folder of the Karaf container which I am using, and there is no way of adding…
Rahul Bobhate
  • 4,892
  • 3
  • 25
  • 48
4
votes
1 answer

Felix maven bundle plugin issue with Include-Resource instruction

The problem: I am generating some files under target/temp that I want to be included in the final bundle wab that is being bundled in the package phase. Here is the code snippet that I am using: <_wab>src/main/webapp
Music lover
  • 41
  • 1
  • 3
1
2
3
8 9