Bundle Scanner

Overview

The bundle scanner installs bundles specified by bundles url.

Syntax

scan-bundle:bundle_url[@start_level][@nostart][@update]

where:

  • bundle_url : mandatory; is the url of the bundle to be installed. It can be any valid url (see also Pax Runner Handler for custom url handlers);
  • start_level : optional; an integer representing the start level of the bundle. If present and OSGi Start Level Service is available then the bundle is installed with that specific start level;
    This option overwrites the startLevel #configuration property;
  • nostart : optional; this should be the hardcoded string "nostart" (not case sensitive); if present the bundle will not be started. Default, if the value is not present the bundle will be started depending on the service #configuration.
    This option overwrites the start #configuration property;
  • update : optional; the hardcoded string "update" (not case sensitive)
    If present the bundles will be updated.
    This option overwrites the update #configuration property;

The above options: start_level/nostart/update can be specified in any order.

Examples

  • scan-bundle:file:/C:/localRepository/org/ops4j/pax/web/bundles/service/0.2.0/service-0.2.0.jar - installs the and bundle from the local hard drive with no specific start level that is installed and started;
  • scan-bundle:mvn:org.ops4j.pax.web.bundles/service@5 - installs a maven artifact bundle installed with start level = 5 and started;
  • scan-bundle:http://repository.ops4j.org/maven2/org/ops4j/pax/web/bundles/service/0.2.0/service-0.2.0.jar@nostart - installs a bundle from http with no specific start level that is just installed and not started

Note that, as stated by the maven handler, if you use an mvn: url, you could use in your url the repository from where the bundle could be downloaded.

Configuration

The service can be configured in two ways: via configuration admin if available and via framework/system properties where the configuration via config admin has priority.

Option key

Description

org.ops4j.pax.runner.scanner.bundle.startlevel

optional; default start level.

org.ops4j.pax.runner.scanner.bundle.start

optional; true/false - if installed bundles should be started ot not. Default value is true, so the bundles are started.

org.ops4j.pax.runner.scanner.bundle.update

optional; true/false - if installed bundles should be updated or not. Default value is false, so the bundles will not be updated.