...
If you are in a hurry to have Apache Felix Karaf up and running right away, this section will provide you with some basic steps for checking out, building and running the server in no time. This is clearly not a complete guide so you may want to check other sections of this guide for further information.
...
Background
Apache Felix Karaf is a small and lightweight OSGi based runtime. This provides a small lightweight container onto which various bundles can be deployed.
Tip |
---|
Apache Felix Karaf started life as the Apache ServiceMix kernel and then moved as a Apache Felix subproject. |
...
The Karaf source is found at http://svn.apache.org/repos/asf/felixkaraf/trunk/karaf/. To check out with a command line client:
Code Block | ||
---|---|---|
| ||
$ svn co http://svn.apache.org/repos/asf/felixkaraf/trunk/karaf/ |
Build
Change directory to the top level of the source checkout. Build Karaf using Maven as follows:
...
Distributions will be created in assembly/target. Select the file compression format compatible with your system (apache-felix-karaf-12.0.0.zip for windows, apache-felix-karaf-12.0.0.tar.gz for unixes) and expand the binary in a new directory; for example in z:\karaf - from now on this directory will be referenced as <KARAF_HOME>. Please remember the restrictions concerning illegal characters in Java paths, e.g. !, % etc.
...
Tip |
---|
To generate Eclipse projects for all modules, in KARAF_HOME type: mvn -Psetup.eclipse Then add each module location, prefixing each name with org.apache.felix.karaf (for example org.apache.felix.karaf.shell.core) |
Start the server
...
Code Block | ||
---|---|---|
| ||
karaf@root> admin:change-port admin:connect admin:create admin:destroy admin:list admin:liststart admin:start admin:stop config:cancel config:edit config:list config:propappend config:propdel config:proplist config:propset config:update features:addUrldev:dynamic-import dev:framework features:installdev:print-stack-traces dev:show-tree features:listaddUrl features:listUrlinfo features:refreshUrlinstall features:removeUrllist features:listUrl features:uninstallrefreshUrl logfeatures:displayremoveUrl features:uninstall log:display log:display-exception log:get log:set osgi:bundle-level osgi:headers osgi:install osgi:list osgi:ls osgi:ls osgi:refresh osgi:resolve osgi:restart osgi:shutdown osgi:start osgi:start osgi:start-level osgi:stop osgi:uninstall osgi:update osgi:update packages:exports packages:exportsimports packagesshell:importscat shell:catclear shell:each shell:echo shell:exec shell:grep shell:grephistory shell:if shell:info shell:java shell:java shell:printflogout shell:new shell:printf shell:sleep shell:sort shell:tac ssh:ssh ssh:sshd cat clear each echo exec ssh:sshd grep history if info java logout new printf sleep sort tac bundle-level headers install list ls refresh resolve restart shutdown start start-level stop uninstall update karaf@root> |
Deploy a sample application
...
Code Block |
---|
>>>> MyTransform set body: Wed Jan 02 23:34:19 CET 20082010 >>>> MyTransform set body: Wed Jan 02 23:34:21 CET 20082010 |
Stopping and uninstalling the sample application
...
This document showed you how simple it is to have Apache Felix Karaf up and running. The overall time for getting the server running should be less than five minutes if you have the prerequisite (Java 1.5) already installed. Additionally, this article also showed you how to deploy and test a simple Apache Camel application in less than five minutes.
...