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
4
votes
2 answers

Cannot start OSGi bundle, missing com.ibm.uvm.tools

I am trying to start a bundle, with a whole bunch of dependencies. I am getting the error could not be resolved. Reason: Missing Constraint: Import-Package: com.ibm.uvm.tools, but cannot find this package in the maven repos or on the web. By…
Midhat
  • 17,454
  • 22
  • 87
  • 114
4
votes
3 answers

for all resources using maven-bundle-plugin

As a temporary measure to be able to transition quickly to OSGi I need to create a single jar with all my libraries in it. What i did was put all the jar libraries in src/main/resources so they end up in the root of the created jar. The problem i am…
Hilikus
  • 9,954
  • 14
  • 65
  • 118
3
votes
0 answers

Fatal error compiling: invalid flag: --release java 8

I am trying to execute maven command mvn clean install on my project, given that : maven is configured with jdk8. I have the following error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile…
Ares
  • 71
  • 1
  • 10
3
votes
1 answer

OpenDaylight OSGi not able to find RDF4J classes even after installing RDF4J bundles

If I use RDF4J with just Maven (no OSGi container), I'm able to utilize all the classes provided by RDF4J. But when I use RDF4J with OpenDaylight, the bundle in which I have used RDF4J classes does not start because of unsatisfied requirements. I'm…
Nitin
  • 86
  • 7
3
votes
2 answers

how to use maven bundle plugin to exclude package out of bundle

i have a bundle that uses maven-jaxb2-plugin to generate all classes to target/generated/src/main/java. Then i use maven bundle plugin to create a bundle. It simply works. Now, i want to exclude (remove) a generated package com.xxx.yyyy.common out…
David
  • 3,538
  • 9
  • 39
  • 50
3
votes
1 answer

Combining automatic and manual export package selection in Maven bundle plugin

Maven bundle plugin, as I know, will automatically add export/import package information to your bundle manifest.mf file, according to it sources. Sometimes you need manually specify export-packages for example if you want to add *.impl packages,…
Architect
  • 155
  • 2
  • 11
3
votes
1 answer

Handling split packages: Require-Bundle with maven-bundle-plugin

I'm adapting an existing collection of libraries, building them as OSGi bundles. It's a multi-module Maven project, with several layers of POM inheritance and aggregation. Ideally, plugin configuration would be placed in parent POMs only. The…
Boj
  • 3,923
  • 3
  • 22
  • 39
3
votes
2 answers

How to handle Import-Package entries which come from jars on the Bundle-Classpath?

I have put a few jars on my Bundle-Classpath. The line below shows the entry in my pom.xml, which uses the Felix plugin to create the manigest.mf for the…
Parag
  • 12,093
  • 16
  • 57
  • 75
3
votes
2 answers

How can one prevent certain attributes from being added to the bundle's manifest with the Maven Bundle Plugin?

I would like to remove certain headers from my release jars (e.g. "Built-by"). I have read that setting the headers to an empty content should do the trick, but it's not working for me. For example, I'm using:
Miquel
  • 15,405
  • 8
  • 54
  • 87
3
votes
3 answers

Error while adding SVN revision in JAR manifest with Maven and maven-bundle-plugin

I am trying to add SVN revision number in the manifest of my projects. To do so, I used Maven build number plugin and added the following lines in my Super POM:
Ben
  • 6,321
  • 9
  • 40
  • 76
2
votes
0 answers

ResolutionException: Unable to resolve root: missing requirement [root] filter:="(osgi.wiring.package=javax.jws)(version>=1.1.0)(!(version>=2.0.0))

When I try to deploy 1 of 7 bundles on my Fabric8's container y got de next error: 2021-06-29 15:24:41,239 | ERROR | dd741-1-thread-1 | DeploymentAgent | 83 - io.fabric8.fabric-agent - 1.2.0.redhat-133 | Unable to update…
2
votes
1 answer

Using a 3rd party dependency within a Maven OSGi bundle

After feeling like I had a grasp on how OSGi is utilized, I tried to go about adding a 3rd party dependency, specifically log4j2, to my application that is utilizing apache felix and bundling with the maven-bundle-plugin. Unfortunately, it seems as…
cjnash
  • 1,228
  • 3
  • 19
  • 37
2
votes
2 answers

How to deal with dependencies with "provided" scope in OSGi

There are lots of tutorials, which shows how to cope with dependencies of the OSGi project and how should they be converted to the bundle. After more than one day research, I have still not found how to deal with the dependencies with provided…
Ad Infinitum
  • 3,560
  • 27
  • 33
2
votes
1 answer

Embedding Dependency in JAR with maven-bundle-plugin not working

I'm suceeded with adding OSGi specific meta-data to the MANIFEST of the flying-saucer-pdf Maven artifact. However, I do not succeed with embedding the dependencies and transitive dependencies of that artifact into the created JAR file. I was using…
2
votes
2 answers

Plans to support "Require-Bundle" in maven-bundle-plugin

Are there plans to support "Require-Bundle" in maven-bundle-plugin, even if its not the recommended OSGi way. There are situations where it makes sense to use "Require-Bundle", for example to merge split packages.
user1654885
  • 131
  • 1
  • 3
  • 8
1 2
3
8 9