-
Notifications
You must be signed in to change notification settings - Fork 46
Description
We currently already require that a framework supports a Framework(Connect)Factory that allows programmatic creation of OSGi frameworks.
But this is quite low level and requires a lot of boilerplate to really get started something that actually is a framework (create it, init, start the system bundle install some inital bundles, raise a start level and so on) while it actually should be very simple and because of this most frameworks also support some kind of (framework specific) java "main" class to start it from the commandline.
To unify access to such "commandline interfaces" Java offers so called ToolProvider that allow a unified access.
I think it would be beneficial if we define such a generic CLI so there is an easy way to fire-up a new framework with less efforts and controll it via the System.in / out as a simple console.
Lets assume we call the tool osgi it should has the following unified parameters:
-Pkey valueto define a framework property that is used to create the instance-B <path to a bundle> <startlevel>:<autostart>a bundle that will be installed and optionally have a startlevel and autostart value assigned
That way one can already get something running very fast by just throw in a bunch of jars and can be controlled through the I/O streams with the following commands:
start / stop <path to bundle>- for starting / stopping a bundleinstall / uninstall <path to bundle>- for install a new bundle or uninstall an existing oneshutdown- to shutdown the framework