Fork me on GitHub

sling:fsmount

Full name:

org.apache.sling:sling-maven-plugin:3.0.4:fsmount

Description:

Create OSGi configurations for the Apache Sling File System Resource Provider. In case a bundle file is supplied via bundleFileName the configuration for its initial content is created. Otherwise it tries to detect a FileVault content package layout starting at fileVaultJcrRootFile or the project's resource directories and potentially creates a configuration for each path in the package's filter.xml.

Attributes:

  • Requires a Maven project to be executed.
  • The goal is not marked as thread-safe and thus does not support parallel builds.
  • Since version: 2.2.0.

Required Parameters

Name Type Since Description
<slingUrl> URI - The URL of the running Sling instance.

The default is only useful for WebConsole deployment.

For WebDAV deployment it is recommended to include the Sling Simple WebDAV servlet root, for instance http://localhost:8080/dav/default/libs/sling/install. Omitting the dav/default segment can lead to conflicts with other servlets.


Default: http://localhost:8080/system/console
User Property: sling.url

Optional Parameters

Name Type Since Description
<bundleFileName> String - The path of the bundle file whose Sling Initial Content should be mounted.
Default: ${project.build.directory}/${project.build.finalName}.jar
User Property: sling.file
<deployFsResourceBundle> boolean 2.3.0 Deploy org.apache.sling.fsresource to Sling instance bundle when it is not deployed already.
Default: true
<deployFsResourceBundlePrerequisites> List<BundlePrerequisite> 2.3.0 Bundles that have to be installed as prerequisites to execute this goal. With multiple entries in the list different bundles with different preconditions can be defined.
Default value is::
<deployFsResourceBundlePrerequisites>
  <bundlePrerequisite>
    <bundles>
      <bundle>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.fsresource</artifactId>
        <version>2.3.0</version>
      </bundle>
    </bundles>
    <preconditions>
      <bundle>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.commons.johnzon</artifactId>
        <version>2.0.0</version>
      </bundle>
      <bundle>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.api</artifactId>
        <version>2.25.4</version>
      </bundle>
      <bundle>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-collections4</artifactId>
        <version>4.1</version>
        <symbolicName>org.apache.commons.collections4</symbolicName>
      </bundle>
    </preconditions>
  </bundlePrerequisite>
  <bundlePrerequisite>
    <bundles>
      <bundle>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.commons.johnzon</artifactId>
        <version>1.2.6</version>
      </bundle>
      <bundle>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-collections4</artifactId>
        <version>4.1</version>
        <symbolicName>org.apache.commons.collections4</symbolicName>
      </bundle>
      <bundle>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.fsresource</artifactId>
        <version>2.2.0</version>
      </bundle>
    </bundles>
    <preconditions>
      <bundle>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.resourceresolver</artifactId>
        <version>1.5.18</version>
      </bundle>
    </preconditions>
  </bundlePrerequisite>
  <bundlePrerequisite>
    <bundles>
      <bundle>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.fsresource</artifactId>
        <version>1.4.8</version>
      </bundle>
    </bundles>
  </bundlePrerequisite>
</deployFsResourceBundlePrerequisites>
<deploymentMethod> BundleDeploymentMethod 2.3.0 Bundle deployment method. One of the following three values are allowed
  1. WebConsole, uses the Felix Web Console REST API for deployment (HTTP POST). This is the default. Make sure that slingUrl points to the Felix Web Console in that case.
  2. WebDAV, uses WebDAV for deployment (HTTP PUT). Make sure that slingUrl points to the entry path of the Sling WebDAV bundle (defaults to /dav/default in the Sling starter). Issues a HTTP Delete for the uninstall goal.
  3. SlingPostServlet, uses the Sling Post Servlet for deployment (HTTP POST). Make sure that slingUrl points a path which is handled by the Sling POST Servlet (usually below regular Sling root URL).
For more details refer to Bundle Installation.
Default: WebConsole
User Property: sling.deploy.method
<failOnError> boolean - Determines whether or not to fail the build if the HTTP POST or PUT returns an non-OK response code.
Default: true
User Property: sling.failOnError
<fileVaultFilterXmlFile> File - Path to META-INF/vault/filter.xml when using FileVault XML filesystem layout.
User Property: sling.filevault.filterxml.file
<fileVaultJcrRootFile> File - FileVault filesystem layout content root folder.
User Property: sling.filevault.jcr_root.file
<httpConnectTimeoutSec> int 3.0.0 HTTP connection timeout (in seconds). Determines the timeout until a new connection is fully established. This may also include transport security negotiation exchanges such as SSL or TLS protocol negotiation).
Default: 10
User Property: sling.httpConnectTimeoutSec
<httpResponseTimeoutSec> int 3.0.0 HTTP response timeout (in seconds). Determines the timeout until arrival of a response from the opposite endpoint.
Default: 60
User Property: sling.httpResponseTimeoutSec
<password> String - The password to authenticate at the running Sling instance.
Default: admin
User Property: sling.password
<skip> boolean - If set to true Sling File System Resource mount/unmount commands are ignored.
Default: false
User Property: sling.fsmount.skip
<slingConsoleUrl> URI - The WebConsole URL of the running Sling instance. This is required for file system provider operations. If not configured the value of slingUrl is used.
User Property: sling.console.url
<slingUrlSuffix> String - An optional url suffix which will be appended to the sling.url for use as the real target url. This allows to configure different target URLs in each POM, while using the same common sling.url in a parent POM (eg. sling.url=http://localhost:8080 and sling.urlSuffix=/project/specific/path). This is typically used in conjunction with WebDAV or SlingPostServlet deployment methods.
User Property: sling.urlSuffix
<user> String - The user name to authenticate at the running Sling instance.
Default: admin
User Property: sling.user

Parameter Details

<bundleFileName>

The path of the bundle file whose Sling Initial Content should be mounted.
  • Type: java.lang.String
  • Required: No
  • User Property: sling.file
  • Default: ${project.build.directory}/${project.build.finalName}.jar

<deployFsResourceBundle>

Deploy org.apache.sling.fsresource to Sling instance bundle when it is not deployed already.
  • Type: boolean
  • Since: 2.3.0
  • Required: No
  • Default: true

<deployFsResourceBundlePrerequisites>

Bundles that have to be installed as prerequisites to execute this goal. With multiple entries in the list different bundles with different preconditions can be defined.
Default value is::
<deployFsResourceBundlePrerequisites>
  <bundlePrerequisite>
    <bundles>
      <bundle>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.fsresource</artifactId>
        <version>2.3.0</version>
      </bundle>
    </bundles>
    <preconditions>
      <bundle>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.commons.johnzon</artifactId>
        <version>2.0.0</version>
      </bundle>
      <bundle>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.api</artifactId>
        <version>2.25.4</version>
      </bundle>
      <bundle>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-collections4</artifactId>
        <version>4.1</version>
        <symbolicName>org.apache.commons.collections4</symbolicName>
      </bundle>
    </preconditions>
  </bundlePrerequisite>
  <bundlePrerequisite>
    <bundles>
      <bundle>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.commons.johnzon</artifactId>
        <version>1.2.6</version>
      </bundle>
      <bundle>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-collections4</artifactId>
        <version>4.1</version>
        <symbolicName>org.apache.commons.collections4</symbolicName>
      </bundle>
      <bundle>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.fsresource</artifactId>
        <version>2.2.0</version>
      </bundle>
    </bundles>
    <preconditions>
      <bundle>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.resourceresolver</artifactId>
        <version>1.5.18</version>
      </bundle>
    </preconditions>
  </bundlePrerequisite>
  <bundlePrerequisite>
    <bundles>
      <bundle>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.fsresource</artifactId>
        <version>1.4.8</version>
      </bundle>
    </bundles>
  </bundlePrerequisite>
</deployFsResourceBundlePrerequisites>
  • Type: java.util.List<org.apache.sling.maven.bundlesupport.BundlePrerequisite>
  • Since: 2.3.0
  • Required: No

<deploymentMethod>

Bundle deployment method. One of the following three values are allowed
  1. WebConsole, uses the Felix Web Console REST API for deployment (HTTP POST). This is the default. Make sure that slingUrl points to the Felix Web Console in that case.
  2. WebDAV, uses WebDAV for deployment (HTTP PUT). Make sure that slingUrl points to the entry path of the Sling WebDAV bundle (defaults to /dav/default in the Sling starter). Issues a HTTP Delete for the uninstall goal.
  3. SlingPostServlet, uses the Sling Post Servlet for deployment (HTTP POST). Make sure that slingUrl points a path which is handled by the Sling POST Servlet (usually below regular Sling root URL).
For more details refer to Bundle Installation.
  • Type: org.apache.sling.maven.bundlesupport.deploy.BundleDeploymentMethod
  • Since: 2.3.0
  • Required: No
  • User Property: sling.deploy.method
  • Default: WebConsole

<failOnError>

Determines whether or not to fail the build if the HTTP POST or PUT returns an non-OK response code.
  • Type: boolean
  • Required: No
  • User Property: sling.failOnError
  • Default: true

<fileVaultFilterXmlFile>

Path to META-INF/vault/filter.xml when using FileVault XML filesystem layout.
  • Type: java.io.File
  • Required: No
  • User Property: sling.filevault.filterxml.file

<fileVaultJcrRootFile>

FileVault filesystem layout content root folder.
  • Type: java.io.File
  • Required: No
  • User Property: sling.filevault.jcr_root.file

<httpConnectTimeoutSec>

HTTP connection timeout (in seconds). Determines the timeout until a new connection is fully established. This may also include transport security negotiation exchanges such as SSL or TLS protocol negotiation).
  • Type: int
  • Since: 3.0.0
  • Required: No
  • User Property: sling.httpConnectTimeoutSec
  • Default: 10

<httpResponseTimeoutSec>

HTTP response timeout (in seconds). Determines the timeout until arrival of a response from the opposite endpoint.
  • Type: int
  • Since: 3.0.0
  • Required: No
  • User Property: sling.httpResponseTimeoutSec
  • Default: 60

<password>

The password to authenticate at the running Sling instance.
  • Type: java.lang.String
  • Required: No
  • User Property: sling.password
  • Default: admin

<skip>

If set to true Sling File System Resource mount/unmount commands are ignored.
  • Type: boolean
  • Required: No
  • User Property: sling.fsmount.skip
  • Default: false

<slingConsoleUrl>

The WebConsole URL of the running Sling instance. This is required for file system provider operations. If not configured the value of slingUrl is used.
  • Type: java.net.URI
  • Required: No
  • User Property: sling.console.url

<slingUrl>

The URL of the running Sling instance.

The default is only useful for WebConsole deployment.

For WebDAV deployment it is recommended to include the Sling Simple WebDAV servlet root, for instance http://localhost:8080/dav/default/libs/sling/install. Omitting the dav/default segment can lead to conflicts with other servlets.

  • Type: java.net.URI
  • Required: Yes
  • User Property: sling.url
  • Default: http://localhost:8080/system/console

<slingUrlSuffix>

An optional url suffix which will be appended to the sling.url for use as the real target url. This allows to configure different target URLs in each POM, while using the same common sling.url in a parent POM (eg. sling.url=http://localhost:8080 and sling.urlSuffix=/project/specific/path). This is typically used in conjunction with WebDAV or SlingPostServlet deployment methods.
  • Type: java.lang.String
  • Required: No
  • User Property: sling.urlSuffix

<user>

The user name to authenticate at the running Sling instance.
  • Type: java.lang.String
  • Required: No
  • User Property: sling.user
  • Default: admin