Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This chapter will demonstrate how to add additional features from a remote maven repository to a default installation of the ServiceMix KernelKaraf.

Info

Last updated January 13, 2009 using smx4knl 1.1.0-SNAPSHOT

...

The following steps will add in the URLs for the ServiceMix NMR and Features locations.

  1. Start the ServiceMix Kernel Karaf
    No Format
    cd bin
    ./servicemix or servicemix.bat
    
  2. Add the following feature install locations
    No Format
    servicemix> features/addUrl mvn:org.apache.servicemix.nmr/apache-servicemix-nmr/1.0.0-m4/xml/features
    servicemix> features/addUrl mvn:org.apache.servicemix.features/apache-servicemix/4.0-m2-SNAPSHOT/xml/features
    
  3. Verify the feature URLs were added -
    No Format
    servicemix> features/listUrl
    mvn:org.apache.servicemix.nmr/apache-servicemix-nmr/1.0.0-m4-SNAPSHOT/xml/features
    mvn:org.apache.servicemix.kernel/apache-servicemix-kernel/1.1.0-SNAPSHOT/xml/features
    mvn:org.apache.servicemix.features/apache-servicemix/4.0-m2-SNAPSHOT/xml/features
    

...

The following steps will install the "web" feature (support for deploying WAR files with Servlet and JSPs into a Jetty server) into your kernel Karaf instance.

  1. List the available features -
    No Format
    servicemix> features/list
     State        Name
    . . .
    [SMX4KNL:uninstalled] web
    . . .
    
  2. Install the web feature (and the sub-features it requires) -
    No Format
    servicemix> features/install web
    
  3. Verify the features were installed
    No Format
    servicemix> features/list
     State        Name
    . . .
    [SMX4KNL:installed  ] web-core
    [SMX4KNL:installed  ] web
    . . .
    
  4. Verify the installed bundles were started
    No Format
    servicemix> osgi/list
    START LEVEL 100
       ID   State         Level  Name
    . . .
    [SMX4KNL:  29] [SMX4KNL:Active     ] [SMX4KNL:   50] Apache ServiceMix Bundles: jetty-6.1.14 (6.1.14.SNAPSHOT)
    [SMX4KNL:  30] [SMX4KNL:Active     ] [SMX4KNL:   50] OPS4J Pax Web - Web Container (0.4.1)
    [SMX4KNL:  31] [SMX4KNL:Active     ] [SMX4KNL:   50] OPS4J Pax Web - Jsp Support (0.4.1)
    [SMX4KNL:  32] [SMX4KNL:Active     ] [SMX4KNL:   50] OPS4J Pax Web Extender - WAR (0.3.0)
    [SMX4KNL:  33] [SMX4KNL:Active     ] [SMX4KNL:   50] OPS4J Pax Web Extender - Whiteboard (0.3.0)
    [SMX4KNL:  34] [SMX4KNL:Active     ] [SMX4KNL:   50] OPS4J Pax Url - war:, war-i: (0.3.2)
    [SMX4KNL:  35] [SMX4KNL:Active     ] [SMX4KNL:   50] Apache ServiceMix WAR Deployer (4.0.0.m2-SNAPSHOT)
    . . .
    
  5. The Jetty server should now be listening on http://localhost:8080/, but with no published applications available.
    No Format
    HTTP ERROR: 404
    NOT_FOUND
    RequestURI=/
    Powered by jetty://
    

...