Thursday, August 18, 2011

Useful commands of karaf OSGI server console

Installing an OSGi bundle from your local file system or local repository. Type the below command on the karaf console.
karaf@root> osgi:install -s file:C:/myrepo/org/apache/camel/camel-osgi/1.5.0/camel-osgi-1.5.0.jar
List OSGi bundles
karaf@root> osgi:list
Search for a specific or gorup of osgi bundle. Below example lists all camel osgi bundles
karaf@root> osgi:list grep camel
Stopping an OSGi bundle
karaf@root> osgi:stop bundle id

Installing featues in servicemix or karaf OSGI server:
First add the url of the feature but make sure that this feature is already installed in your maven repository otherwise you will not be able to install.
karaf@root> featues:addUrl -s mvn:org.apache.camel.karaf/apache-camel/2.7.1/xml/features
-s option starts all features listed in the descriptor file.
karaf@root> features:install camel-http
To list all features installed in servicemix or karaf
karaf@root> features:list
karaf@root> features:list grep feature name

No comments:

Post a Comment