Good day.
I am trying to get the benefits of OBR in my application. I took Karaf Cave (4.0.0) as OBR implementation and org.apache.felix.bundlerepository (2.0.4) as OBR client. I successfully configured the repository itself but I can't properly use it. The problem is: when I install the bundle via OBR and all its dependencies are already installed in OSGI runtime, it is installed successfully. But if some of the requirements are missing, I got an "Unsatisfied requirements" error, which is odd, since I know for sure that all the resources which resolves these requirements are present in the OBR descriptor and all links to them are valid.
Why aren't they resolved automatically? How to configure OBR client to work with Karaf Cave?
I also tried OBR implementation from Sonatype Nexus (OBR plugin) and found out that the OBR descriptor generated by Cave, and the one generated by Nexus, are differ. Moreover:
- the one generated by Cave is OSGI compendium spec compliant
- the one generated by Nexus is not, but works like a charm with org.apache.felix.bundlerepository - the problem is not reproduced.
I am completely confused.
The step sequence to reproduce the problem (reproduced on Apache Karaf 4.0.0):
1) Installing Karaf Cave:
feature:repo-add cave
feature:install cave-server cave-http
2) Creating a cave repository:
cave:create-repository test
cave:proxy-repository test file:///path/to/some/local/maven/repo
- On this step I am able to successfully retrieve an OBR descriptor from http://localhost:8181/cave/http/test-repository.xml
3) Install the OBR client and register 'test' cave repository from Karaf:
feature:install obr
obr:url-add http://localhost:8181/cave/http/test-repository.xml
4) Try to deploy some OBR resources with obr:deploy