File Scanner

Skip to end of metadata
Go to start of metadata
Unknown macro: {ops4j-style-page}
Unknown macro: {scrollbar}

Overview

The file scanner handles a set of bundles listed in plain text file(s).

Syntax

where:

  • file_url : mandatory; is the url of the file containing the list of bundles to be installed;
  • start_level : optional; an integer representing the start level of the bundles present in the pom.
    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 bundles will not be started.
    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

File Format

Files containing bundles to be installed must be plain text files containing url's of the bundles to be installed on separate line, one bundle per line and/or system properties. If system properties are present, those will be carried into the OSGi platform.
The syntax of an bundle reference is as follow:

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;
  • 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.
  • update : optional; this should be the hardcoded string "update" (not case sensitive); if present and the bundle was already installed before, the bundle will be updated. Default, if the value is not present the bundle will be updated or not depending on the service configuration.

The syntax of a property is as follow:

where

  • property-name : the key of the property
  • property-value : the value of the property. The value can contain place holders as ${name} where name is the name of the property the ${name} placeholder will be replaced with.

The file can contain empty lines or lines starting with #, case when those lines will be skipped. This allows nice separation and comments.

File Examples

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.file.startlevel optional; default start level
org.ops4j.pax.runner.scanner.file.start optional; true/false - if installed bundles should be started or not. Default value is true, so the bundles are started.
org.ops4j.pax.runner.scanner.file.update optional; true/false - if installed bundles should be updated or not. Default value is false, so the bundles will not be updated.
Labels:
osgi osgi Delete
pax-runner pax-runner Delete
service service Delete
install install Delete
provision provision Delete
pax-runner-module pax-runner-module Delete
file file Delete
scanner scanner Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Clicky Web Analytics