JCR Installer ProviderPage edited by Carsten ZiegelerChanges (1)
Full ContentThe JCR installer provider scans the JCR repository for artifacts and provides them to the OSGI installer. Configuration and ScanningThe JCR installer provider can be configured with weighted paths which are scanned. By default, the installer scans in /apps and /libs where artifacts found in /apps get a higher priority. The installer does a deep scan and uses a regular _expression_ to detect folders containing artifacts to be installed. By default, artifacts from within a folder named install are provided to the OSGi installer. If such an install folder contains a binary artifact (e.g. a bundle) this is provided to the OSGi installer. In addition a node of type sling:OsgiConfig is provided as a configuration to the installer. The jcr installer provider does not check or scan the artifacts itself, the detection and installation is deferred to the OSGi installer. Runmode SupportThe JCR installer supports run modes for installing artifacts. By default folders named install are checked for artifacts. If Apache Sling is started with one (or more run modes), all folders named install.RUNMODE are scanned as well. To be precise, the folder name can be followed by any number of run modes separated by comma. For example, if started with run modes dev, a1, and public, folders like install.dev, install.a1, install.public are searched as well as install.dev.a1, or install.a1.dev. Artifacts from folders with a run mode get a higher priority. For example by default, an install folder underneath /libs gets the priority 50. For each run mode in the folder name, this priority is increased by 1, so install.dev has 51 and install.a1.dev is 52. ExampleHere's a quick walkthrough of the JCR installer functionality. InstallationStart the Sling launchpad/app and install and start the following additional bundles:
To watch the logs produced by these modules, you can filter sling/logs/error.log using egrep 'jcrinstall|osgi.installer'. Install and remove a bundleWe'll use the Knopflerfish Desktop bundle for this example, it is convenient as it displays a graphical user interface when started. We use curl to create content, to make it easy to reproduce the example by copying and pasting the curl commands. Any other way to create content in the repository will work, of course. By default, JCRInstall picks up bundles found in folders named install under /libs and /apps, so we start by creating such a folder: curl -X MKCOL http://admin:admin@localhost:8888/apps/jcrtest curl -X MKCOL http://admin:admin@localhost:8888/apps/jcrtest/install
Many of these tests are fairly readable, and can be used to find out in more detail how these modules work.
Change Notification Preferences
View Online
|
View Changes
|
Add Comment
|
- [CONF] Apache Sling Website > JCR Installer Provider confluence
- [CONF] Apache Sling Website > JCR Installer Provider confluence
- [CONF] Apache Sling Website > JCR Installer Provider confluence
