I currently use karaf with artifactory as my osgi jar repository. This works well. I have come across the Apache Cave tool for Karaf which very much looks like a repository except that it can also be stored in a database or other datasource instead of a filesystem.
What value does this provide. What are some of the usecases that can be solved using Cave
Disclaimer: I'm not involved in development of OSGi specs or Apache Cave. Everything below is only my conclusions based on personal experience.
Apache Cave is reference implementation of OSGi Repository spec. The latter in turn solves problems of OSGi bundles provisioning. It is supposed to work in the following way: it provides a repository descriptor, which defines a set of resources (usually they are bundles), capabilities they provide, and requirements they require. This meta-information is used to automatically provision dependencies when you deploy some resource.
Details are explained in the specification https://osgi.org/download/r6/osgi.cmpn-6.0.0.pdf, section 132.
Situation around OSGi repository seems quite shady for me. Apache Cave is a provider of OSGi repository, but I didn't found any suitable client for it. My question, Karaf Cave vs org.apache.felix.bundlerepository, still remain unanswered.
There are several alternatives. Apache Felix has its own implementation (org.apache.felix.bundlerepository), which is very similar by concept, but not fully compatible with the spec (info may be outdated and needs check). Karaf solves the same problem with Features facility.