Chapter 7. Deploying an OSGi Bundle
Abstract
Apache Karaf provides two different approaches for deploying a single OSGi bundle: hot deployment or manual deployment. If you need to deploy a collection of related bundles, on the other hand, it is recommended that you deploy them together as a feature, rather than singly (see Chapter 8, Deploying Features).
7.1. Hot Deployment
Hot deploy directory
Red Hat JBoss Fuse monitors JAR files in the
InstallDir/deploy
directory and hot deploys everything in this directory. Each time a JAR file is copied to this directory, it is installed in the runtime and also started. You can subsequently update or delete the JARs, and the changes are handled automatically.
For example, if you have just built the bundle, ProjectDir
/target/foo-1.0-SNAPSHOT.jar
, you can deploy this bundle by copying it to the InstallDir/deploy
directory as follows (assuming you are working on a UNIX platform):
% cp ProjectDir/target/foo-1.0-SNAPSHOT.jar InstallDir/deploy