Hi all
The Web Console bundle provides JQuery libraries for use by plugin bundles. It
has once been discussed, whether the provisioning of these libraries should be
exposed in the Export-Package header. At that time we -- correctly IMHO --
dismissed this idea.
As of OSGi Core 4.3 we now have a generic capabilities and requirements model,
which allows us to model these dependencies.
So I suggest, the Web Console defines a namespace for such libraries, etc.
provided and exposes them as generic capabilities. Plugins could then require.
Provide-Capability =
felix.webconsole; name=JQuery; version:Version=1.3.2;
path=webconsole/res/lib/jquery-1.3.2.js,
felix.webconsole; name=JQuery-UI; version:Version=1.8.1;
path=webconsole/res/lib/jquery-ui-1.8.1.js
A plugin could then require JQuery 1.3 or higher:
Require-Capability =
felix.webconsole; filter:="(&(name=JQuery)(version>=1.3))
When running in a 4.3 (or later) compliant framework these capabilities and
requirements will be enforced. While in an earlier framework the headers are
just ignored.
WDYT ?
As for the namespace: Would felix.webconsole be ok ? Or should that be
org.apache.felix.webconsole ? Would it make sense to register that with the
OSGi alliance ?
Regards
Felix