This is an automated email from the ASF dual-hosted git repository.
ghenzler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-site.git
The following commit(s) were added to refs/heads/master by this push:
new 6187775 SLING-7790 Documentation for Installer Vault Package Install
Hook
new 8722771 Merge branch 'master' of [email protected]:apache/sling-site.git
6187775 is described below
commit 6187775bd28b5df0163cd11baf5890e074046876
Author: georg.henzler <[email protected]>
AuthorDate: Wed Oct 10 23:06:10 2018 +0200
SLING-7790 Documentation for Installer Vault Package Install Hook
---
src/main/jbake/content/documentation/bundles.md | 1 +
.../bundles/installer-provider-installhook.md | 52 ++++++++++++++++++++++
2 files changed, 53 insertions(+)
diff --git a/src/main/jbake/content/documentation/bundles.md
b/src/main/jbake/content/documentation/bundles.md
index d608785..6bd6f76 100644
--- a/src/main/jbake/content/documentation/bundles.md
+++ b/src/main/jbake/content/documentation/bundles.md
@@ -44,6 +44,7 @@ The OSGi installer is a very flexible and powerful service to
manage provisionin
* [Subsystem Installer
Factory](/documentation/bundles/subsystem-installer-factory.html)
* [JCR Installer Provider](/documentation/bundles/jcr-installer-provider.html)
* [File Installer
Provider](/documentation/bundles/file-installer-provider.html)
+* [Vault Package Install
Hook](/documentation/bundles/installer-provider-installhook.html)
## Development and Utilities
* [Commons Thread
Pools](/documentation/bundles/apache-sling-commons-thread-pool.html)
diff --git
a/src/main/jbake/content/documentation/bundles/installer-provider-installhook.md
b/src/main/jbake/content/documentation/bundles/installer-provider-installhook.md
new file mode 100644
index 0000000..92f25ef
--- /dev/null
+++
b/src/main/jbake/content/documentation/bundles/installer-provider-installhook.md
@@ -0,0 +1,52 @@
+title=Installer Vault Package Install Hook
+type=page
+status=published
+tags=installer
+~~~~~~
+
+## Overview
+
+The Installer Vault Package Install Hook allows to install bundles and
configurations synchronously during vault package installation by feeding them
directly to the [OSGI installer
core](/documentation/bundles/osgi-installer.html). That way [vault package
dependencies](http://jackrabbit.apache.org/filevault/properties.html) can be
used to not only depend on content of a package, but also on configurations and
bundles contained in a package (the installer install hook has to be added to
[...]
+
+## Installation Process
+
+The Installer Vault Package Install Hook scans through the contained files and
installs bundles (extension `jar`) and OSGi configurations with extension
`config` (`conf` and node configurations are not supported). Runmode folders
(e.g. `install.publish` or `config.author`) are supported. To perform the
installation, the hook registers the installable resources to the OSGi
installer core with the exact same digest as the JCR installer would do (hence
the JCR installer that will also proce [...]
+
+## Configuration
+
+To include the install hook into a content package, use the following code:
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-hook-into-package</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.sling</groupId>
+
<artifactId>org.apache.sling.installer.provider.installhook</artifactId>
+ <version>1.0.0</version>
+ </artifactItem>
+ </artifactItems>
+
<outputDirectory>${project.build.directory}/vault-work/META-INF/vault/hooks</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+
+The following package properties are supported (only `installPathRegex` is
required):
+
+| Property | Value| Description |
+|---|---|---|
+| `installPathRegex` | Regex, e.g. `/apps/myproj/.*` or
`/apps/myproj/install/mybundle-1.0.0.jar` | Regex to match all
bundles/configurations to be installed synchronously, . Note: The JCR installer
will pick up paths that are not matched asynchronously|
+| `maxWaitForOsgiInstallerInSec ` | defaults to 60 sec | Maximum wait time
until installation is successful |
+| `waitForOsgiEventsQuietInSec ` | defaults to 1 sec | Time to wait for OSGi
events to go quiet. Default normally works well for bundles, for certain
configurations that trigger restart of bundles this can be increased. |
+| `osgiInstallerPriority ` | defaults to 2000 | Priority, by default higher
than the standard installation priority of the JCR installer to ensure
bundles/configs from this mechanism take higher priority |
+| `installhook.installer.class` |
`org.apache.sling.installer.provider.installhook.OsgiInstallerHook` |
Alternative to including the hook in package, however then the bundle
`org.apache.sling.installer.provider.installhook` needs to be installed as
prerequisite |