Just upload a new patch:
I modified the design as the following:
1. Only one cli is kept. That is:
deploy install-bundle --inplace --start --startLevel 90 D:\BlueprintSample\SampleBundles\HelloWorld.jar
This cli will install the bundle to osgi framework and record it in the var/config/bundle-records.csv file. If "--start" option is specified, the command uses the OSGi's FrameworkMBean to start the bundle.
2. Use a BundleTracker to track Uninstalled bundles, if the bundle is listed in the bundle-records.csv, the tracker will erase it. That is, user can use the normal osgi uninstall command to uninstall a recorded bundle and its record will be automatically erased in back.
3. Modified the BundleRecorder interface, only one API is exposed:
public long recordInstall(File bundleFile, boolean inplace, int startLevel)
So, if GEP want to start/stop a bundle, it could use the OSGi's FrameworkMBean, like what does in install-bundle cli.