The bundle must be “embedded” inside the .urcap file, which essentially is a .jar file.
Please check your pom.xml file for the <Embed-Dependency> tag, and embed the bundle through here.
You can check is the dependency is a success, by checking the .jar file after build for the referenced dependency.
Besides from embedding the necessary classes, OSGi will also expect MANIFEST.mf to include the correct Export-Package packages. However if the dependency already is a valid OSGi-bundle, this will happen automatically.
Please note, that since the URCap API uses generic OSGi, you should check out relevant Maven and OSGi manuals for further documentation.
I was able to embed the bundle in a urcap. I validated that the bundle is working with the Remote Shell. But the embedded bundle was not loaded automatically. Specifically, here is what I did on the Remove Shell:
It seems you have not embedded the dependency in your URCap?
But just has a bundle placed somewhere in the controller?
You should embed the dependency using <Embed-Dependency> tag, so you have exactly one bundle, which would be your .urcap file.
If you have issues making this work, please upload your pom.xml file so I might investigate it.
I want to be sure that I did not misunderstand your original post. This tag can be used to embed an additional OSGi bundle in my URCap? Is that right? So if I emded an additional bundle I should expect its Activator to be executed in addition to the URCap’s Activator. Is that right?
To answer your questions, I’m pretty sure I did use the tag since I can see my embedded bundle in the folder bundle.jar-embedded in the felix-cache. Here are my two pom.xml. The first one is the urcap. The second one is the OSGi addition bundle.
i faced a related issue today as i tried to use third-party jars and update their version with a urcap remote update. It seems that the embedded jars are not updated until their zombie copies in the felix-cache folder are dropped and replaced by the updated embedded jar from the urcap update.
Is there a way to clear these embedded jars in the felix cache folder on deployment?