Provisioning
Provisioning
Pax Runner provisioning refers to the process of downloading, installing and starting of OSGi bundles within the target OSGi framework. Pax Runners provides a variety of ways to specify the bundles to be installed as follows:
Detailed provisioning options
In the pages bellow you may find detailed descriptions about different ways you can provision bundles using Pax Runner.
- Provision a bundle from an URL
- Provision bundles from a text file
- Provision bundles from a Maven POM file
- Provision bundles from a zip
- Provision bundles from file system
- Provision bundles from OBR
- Provision bundles from Apache Karaf (ServiceMix) features
- Composite provisioning
Provisioning options
All of the provisioning options yous see above will allow you to specify if the bundles to be installed will be started, the start level that the bundles will be started and/or specify if Pax Runner should re-download the bundles.
Specify if the bundle should not be started
By default all the provisioned bundles will be automatically started. To not start the bundles you must append @nostart
to the provisioning spec. If @nostart
is specified the bundles scanned from the provision spec it will not be started.
As an example you can use the snippet bellow to install but not start Pax Web service:
pax-run mvn:org.ops4j.pax.web/pax-web-service/0.6.0@nostart
Specify the start level
If your use case requires setting the start level of the provisioned bundles you must append @<level>
to the provisioning spec. If @<level>
is specified the bundles scanned from the provision spec will be started at the specified level
.
As an example you can use the snippet bellow to install and start Pax Web service at level 20:
pax-run mvn:org.ops4j.pax.web/pax-web-service/0.6.0@20
Force bundle re-download
By default Pax Runner will cache the bundles to be provisioned in order to speedup a future restart. To override this behavior you must append @update
to the provisioning spec. If @update
is specified the bundles scanned from the provision spec will be first re-download into the caching directory.
As an example you can use the snippet bellow to force re-download of Pax Web service:
pax-run mvn:org.ops4j.pax.web/pax-web-service/0.6.0@update
Note that the caching behavior can be altered using --keepOriginalUrls
option.