What value does this provide? What are some of the usecases that can be solved using Cave?
Cave
is used to store Repositories
which contain important information (such as location, version, requirements, capabilities, ...) about bundles (or artifacts in general). It's one of the 3 important pieces in resolving process. The other 2 are Resolver
and Resolve Context
.
The Resolver
is what you may know from OSGi runtime. It is the thing that tells you if your bundle's requirements are met (so it can be started). To do so it talks to a Resolve Context
to get to know what is available, what is expected, what is optional, etc. The Resolve Context
would in turn consult one or more Repositories
to get to know what bundles are available. Quite often those are only the bundles installed in your runtime. However it is possible to have a runtime that would use Repository
referring to external artifacts that can be installed when Resolver
determines they are needed.
Roughly the same concept can be used at build time. Bnd project for example allows you to define .bndrun
files which are kind of properties based version of Resolve Context
. One of the things you can provide inside them is Repositories
that have information about available bundles. Such repositories could be served by Cave
(or anything else, including local XML file). Based on that information Bnd
can assemble a runtime for you (tell you which bundles you need based on what bundle(s) you want to run).
Furthermore, Cave
can act as Maven repository or proxy to other Maven repositories. That comes handy as you could use Cave
as "single point of contact" for both Resolver
and traditional Maven dependencies.