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
2
votes
1 answer

maven bundle plugin No translation found for macro:

I use maven bundle plugin for bundle spring project. I'm use spring property placeholder in my project. When I building my project I take following warnings: [WARNING] Bundle groupId:artifactId:bundle:1.9-SNAPSHOT : No translation found for macro:…
2
votes
0 answers

Maven / OSGi: deploying to an OBR which is not the maven repos

My maven build installs artifacts locally and requires access to the project's remote maven repository. I don't have write access to that repository - so my builds (containing my changes) are only local so far. When I build, I would like to deploy…
Philipp
  • 4,659
  • 9
  • 48
  • 69
2
votes
1 answer

BND includes exported packages of the same bundle in 'uses' directive

I'm packaging a library as an OSGi bundle using maven-bundle-plugin, which uses BND. I noticed BND generated a very long Export-Package list, mainly because it includes many packages that are exported by the library itself in the uses directive of…
Boj
  • 3,923
  • 3
  • 22
  • 39
2
votes
1 answer

CQ5 how to use external jars in custom plugins

I have to create my own plugin to parse xml and do other stuff. I've created my own bundle plugin that will contain my parser class, pom.xml below:
2
votes
1 answer

install osgi dependencies via maven bundle and sling plugins

I have an osgi-bundle which is created by using the maven-bundle-plugin: org.apache.felix maven-bundle-plugin
recalcitrant
  • 939
  • 11
  • 23
2
votes
1 answer

How can I build a OSGi bundle with maven that includes non-code resources from an OSGi fragment?

I have an OSGi fragment containing non-code resources - that is effectively a jar file containing a set of resources (image files, etc) - that I have built with maven. I would like to build another bundle with maven which depends on the fragments…
user1991839
  • 1,993
  • 2
  • 14
  • 11
2
votes
2 answers

How to exclude a named package from a dependency that exists in another dependency using Maven Bundle Plugin (BND)?

I have two dependencies: org.postgis postgis-jdbc 1.5.2 org.postgresql
wulfgarpro
  • 6,666
  • 12
  • 69
  • 110
2
votes
2 answers

how can maven-bundle-plugin find packages in Import-Package

Is there any relationship between the bundles mentioned in the tag and the tag? I mean if we don't define dependency, then maven-bundle-plugin can not find the packages in tag?
user1450233
  • 61
  • 1
  • 6
2
votes
1 answer

How to get maven-bundle-plugin to include maven dependencies in OSGi manifest

Hoping someone can help me with this problem. I'm trying to use the maven-bundle-plugin to automatically generate my OSGi manifest, from my maven dependencies. Some dependencies I'm installing in the OSGi container, since they're shared across…
2
votes
0 answers

Embeding dependencies except type bundle

In a POM parent I'm defining all common rules to build a bundle. In the Embed-Dependency instruction I would like to write : *;scope=compile|runtime;artifactId=!my-api;type=!bundle "Embed all dependencies having…
kiki
  • 241
  • 4
  • 11
1
vote
1 answer

What mean packaging:bundle mean inside the POM?

When I download the protobuf-javalite-3.17.3 pom: https://repo1.maven.org/maven2/com/google/protobuf/protobuf-javalite/3.17.3/protobuf-javalite-3.17.3.pom I can see inside bundle What packaging : bundle mean exactly? on…
zeus
  • 12,173
  • 9
  • 63
  • 184
1
vote
0 answers

How to convert Elasticsearch Java API Client into OSGI bundle?

I want to convert Elasticsearch Java API Client into an OSGI bundle as it is not readily available anywhere. I tried the following command to create one on my own but it not work. I also tried maven bundle plugins but it resulted in the same error.…
1
vote
0 answers

Getting the Maven build failure at JaxRS dependency updated the dependency and still getting the issue

Hi Please help me to resolve the below issue. APPLICATION FAILED TO START Description: An attempt was made to call a method that does not exist. The attempt was made from the following…
Teja K
  • 71
  • 1
  • 7
1
vote
1 answer

Maven Bundle Plugin adding Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=9.0))"

I'm trying to deploy OpenAPI generated code in Karaf. Karaf says I need: javax.annotation.meta;version="[3.0,4)" javax.xml.bind.annotation;version="[2.3,3)" I'm using Java 1.8 to compile, and to run the code. I'm using maven-bundle-plugin v3.5.1 No…
djb
  • 1,635
  • 3
  • 26
  • 49
1
vote
0 answers

Force maven-bundle-plugin to use a specific osgi.ee Require-Capability

We are building a OSGi bundle using maven-bundle-plugin. The default configuration works good but the problem arises when deploying the bundle in a container. Running jdeps on the jar shows the code is compatible with compact1 profile and I would…
1 2 3
8 9