maven-bundle-plugin

Multiple references with the same name at maven-bundle-plugin

懵懂的女人 提交于 2021-02-10 18:11:46
问题 I'm using the maven-bundle-plugin 3.3.0 and OSGI R6. I have the following classes: //Class A @Component (immediate = true, service = {}) public class A{ private static B myB; @Reference (unbind = "unbindB") public static void bindB(B pB) { myB = pB; } public static void unbindB() { myB= null; } } //B class. It does not implement any interface. Hence, the service must be itself @Component (immediate = true, service = B.class) public class B{ @Activate public void activate(){ //B activated } }

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

◇◆丶佛笑我妖孽 提交于 2020-01-13 11:33:32
问题 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 can be included into the bundle using <Include-Resource> instruction: <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>3.0.1</version> <extensions>true</extensions> <configuration>

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

我们两清 提交于 2020-01-13 03:44:30
问题 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 it there manually. I have access only to the deploy folder, where I can deploy my bundles. I am using maven bundle plugin to package my bundle. So, I wanted to know whether there is a way to add the dependency jar in my bundle. Currently, I am

OSGI bundle dependencies

谁说我不能喝 提交于 2020-01-03 19:43:52
问题 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: Unable to resolve com.felix.test [20](R 20.0): missing requirement [com.felix.test [20](R 20.0)] osgi.wiring.package; (osgi.wiring.package=groovy.lang) Unresolved requirements: [[com.felix.test [20](R 20.0)] osgi.wiring.package; (osgi.wiring.package

OSGI bundle dependencies

被刻印的时光 ゝ 提交于 2020-01-03 19:42:10
问题 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: Unable to resolve com.felix.test [20](R 20.0): missing requirement [com.felix.test [20](R 20.0)] osgi.wiring.package; (osgi.wiring.package=groovy.lang) Unresolved requirements: [[com.felix.test [20](R 20.0)] osgi.wiring.package; (osgi.wiring.package

<Export-Package> for all resources using maven-bundle-plugin

こ雲淡風輕ζ 提交于 2020-01-02 05:36:28
问题 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 having is telling the maven-bundle-plugin to export ALL the packages in the jars. So basically, i want to expose all my libraries to other OSGi bundles This is the first thing I tried in my POM <build> <plugins> <plugin> <groupId>org.apache.felix<

Should I use POM first or MANIFEST first when developing OSGi application with Maven?

不羁的心 提交于 2019-12-17 22:40:16
问题 There are two main approaches when developing an OSGi application with Maven: POM-first and MANIFEST first. I'm looking for an answer that is in a form of a table that shows pros and cons of each method. To be more specific, I would also like to know how it relates to: Maturity of toolset Vendor independence Development ease (which includes finding people who can do the development on the tooling) Compatibility Avoiding ClassNotFound Avoiding manual work 回答1: At present this is what I can

OpenSAML3 resource not found 'default-config.xml' in OSGi container

心不动则不痛 提交于 2019-12-11 06:18:57
问题 I'm trying to upgrade to OpenSAML 3 in an OSGi bundle running on Apache Karaf (4.0.5) using opensaml servicemix bundle ( org.apache.servicemix.bundles:org.apache.servicemix.bundles.opensaml:jar:3.2.0_1 ). A test that parses the SAML is working so I think I'm on the right track. However, if I install the bundle on Karaf I get a "resource not found" error when it's trying to load default-config.xml . 2016-06-21 16:29:10,477 | INFO | ool-120-thread-1 | InitializationService | 388 - org.apache

Unresolved requirement: osgi.component

核能气质少年 提交于 2019-12-11 00:49:59
问题 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 solve this issue? What is osgi.component bundle? Why is needed? Why maven-bundle-plugin (thereby also bnd), declares it inside the entry "Require-Capability"? If I need to install it on the OSGi framework, where may I find it? Some additional

Override Require-Capability in Maven-Bundle-Plugin

被刻印的时光 ゝ 提交于 2019-12-10 19:27:07
问题 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 headers in the manifest: Require-Capability:osgi.service;effective:=active;objectClass=javax.persistence.spi.PersistenceProvider;javax.persistence.provider=org.apache.openjpa.persistence.PersistenceProviderImpl, Require-Capability: osgi.extender