控制osgi framework的命令:
launch - start the OSGi Framework
shutdown - shutdown the OSGi Framework
close - shutdown and exit
exit - exit immediately (System.exit)
init - uninstall all bundles
setprop <key>=<value> - set the OSGi property
控制bundle的命令:
install - install and optionally start bundle from the given URL
uninstall - uninstall the specified bundle(s)
start - start the specified bundle(s)
stop - stop the specified bundle(s)
refresh - refresh the packages of the specified bundles
update - update the specified bundle(s)
顯示bundle狀態(tài)的命令:
status [-s [<comma separated list of bundle states>] [<segment of bsn>]] - display installed bundles and registered services
ss [-s [<comma separated list of bundle states>] [<segment of bsn>]] - display installed bundles (short status)
services {filter} - display registered service details
packages {<pkgname>|<id>|<location>} - display imported/exported package details
bundles [-s [<comma separated list of bundle states>] [<segment of bsn>]] - display details for all installed bundles
bundle (<id>|<location>) - display details for the specified bundle(s)
headers (<id>|<location>) - print bundle headers
log (<id>|<location>) - display log entries
其它的命令一般不怎么用到,就不貼出來(lái)了.
一般啟動(dòng)好osgi后,我們會(huì)用ss命令來(lái)看看當(dāng)前bundles的啟動(dòng)狀態(tài)
用install命令把開(kāi)發(fā)好的bundle部署到osgi中
用update命令更新已經(jīng)部署的bundle
用uninstall命令停止一個(gè)bundle的服務(wù)