karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntle <n...@castortech.com>
Subject How to install bundles from p2 site
Date Thu, 21 Mar 2019 21:18:32 GMT

We have quite a number of bundles (>100) that we develop and host on our p2
site. I'm looking for a way to install them all on karaf. What i have tried
so far:

1.used https://github.com/hstaudacher/tycho-karaf-bridge to build a kar file
from the "plugins" folder of p2 site. This maven plugin didn't play well
with our manifests. In all of our bundle manifest, we use "x.x.x.qualifier"
as version. And thus, import-package and require-bundle also use same
version format. When generating the kar file, the maven plugin replace
.qualifier to -qualifier and also synthesize groupid but it did not add this
groupid to the features.xml file. And lastly, when i install the kar file
even after modifying the qualifier and groupid mentioned above, i got this
error which i dont know how to solve: "java.io.IOException: Error resolving
artifact com.castortech.iris.emf.forms:[0.0,): [Could
not find metadata
com.castortech.iris.emf.forms: in local
(C:\Users\ntle\.m2\repository), Could not find metadata
com.castortech.iris.emf.forms: in
castor (file:/C:/Users/ntle/git/baMavenRepo/castortech/)"

2.add the "plugins" folder of my p2 site to
org.ops4j.pax.url.mvn.repositories in org.ops4j.pax.url.mvn.cfg. Then
manually build a feature.xml file with all of our bundles using file
Then in karaf, add this feature.xml as a feature repo and install the
feature. However, i got this error:
"Unable to resolve root: missing requirement [root] osgi.identity;
osgi.identity=IrisBA; type=karaf.feature; version="[1.0.0,1.0.0]";
[caused by: Unable to resolve IrisBA/1.0.0: missing requirement
[IrisBA/1.0.0] osgi.identity; osgi.identity=com.castortech.filters.core;
type=osgi.bundle; version="[,]";
resolution:=mandatory [caused by: Unable to resolve
com.castortech.filters.core/ missing requirement
[com.castortech.filters.core/] osgi.wiring.package;
[caused by: Unable to resolve
com.castortech.util.eclipse/ missing requirement
[com.castortech.util.eclipse/] osgi.wiring.package;

Is there another approach that i should try?

One thing i noticed is that if i use bundle:install file:///pathToMyLocalJar
then the jar got installed but only itself, no dependent bundle was pulled
in. Does it mean dependency resolution only happen when installing feature?

Thai Le

Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html

View raw message