Skip to content

Latest commit

 

History

History
57 lines (36 loc) · 2.21 KB

README.md

File metadata and controls

57 lines (36 loc) · 2.21 KB

Feature OSGi example

This example deploys three of our existing examples using a feature file. The file also encompasses all of their dependencies.

Requirements:

Setup

Because this Feature file installs several of the bundles for the other Quick Starts, you should first build the following other Quick Starts using the command mvn clean install.

  • rest_dsl
  • properties
  • soap

Building

To build the project.

 mvn clean install

This will build the feature file.

Deploying to Red Hat Fuse

To start up Fuse browse to your fuse install directory. Then run

 /bin/fuse

This will bring up the fuse console. Once in the console you will be able to install your bundle. Usually we would install multiple bundles using a feature file, but in this case since we only have one bundle to install we can just install it using the file by the following command. Another option is to set up your local m2 repository in fuse in the fuse/etc/org.ops4j.pax.url.mvn.cfg file. Then you can use the mvn syntax below.

 karaf@root> features:addurl mvn:com.redhat.consulting.fusequickstarts.karaf/feature/7.6/xml/features
   
 karaf@root> features:install -v my-services 

The -v here stands for verbose and is optional.

Results

After running the above commands you should see your services started:

 [ 291] [Active     ] [Created     ] [       ] [   80] Fuse Quick Start :: Karaf :: Blueprint :: Camel REST DSL (7.6)
 [ 292] [Active     ] [Created     ] [       ] [   80] Fuse Quick Start :: Karaf :: Blueprint :: OSGi Config Admin Service (7.6)
 [ 293] [Active     ] [Created     ] [       ] [   80] Fuse Quick Start :: Karaf :: Blueprint :: Camel-CXF SOAP (Code First) (7.6)

Troubleshooting

Error resolving artifact com.redhat.consulting.fusequickstarts.karaf

If you get this error it means that you need to build the missing Quick Start so that it will be installed into your local maven repository. Otherwise the Feature will not be able to locate the bundle to install it.