Author: kwin
Date: Thu Feb 25 14:23:57 2016
New Revision: 1732310
URL: http://svn.apache.org/viewvc?rev=1732310&view=rev
Log:
document changes for SLING-5335
Modified:
sling/site/trunk/content/documentation/development/sling.mdtext
Modified: sling/site/trunk/content/documentation/development/sling.mdtext
URL:
http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/development/sling.mdtext?rev=1732310&r1=1732309&r2=1732310&view=diff
==============================================================================
--- sling/site/trunk/content/documentation/development/sling.mdtext (original)
+++ sling/site/trunk/content/documentation/development/sling.mdtext Thu Feb 25
14:23:57 2016
@@ -1,13 +1,12 @@
-translation_pending: true
Title: Maven Sling Plugin
-The Maven Sling Plugin provides a number of goals which may be of help while
developping bundles for Sling. To run the plugin you need at least Maven 2.x
and JDK 1.5 or higher. Maven Sling Plugin provides the following goals:
+The Maven Sling Plugin provides a number of goals which may be of help while
developping bundles for Sling. To run the plugin you need at least Maven 3.x
and JDK 1.6 or higher. Maven Sling Plugin provides the following goals:
| Name | Description |
|--|--|
-| [sling:deploy](#the-deploy-goal) | Deploy a OSGi-bundle into a running Sling
instance. |
-| [sling:deploy-file](#the-deploy-file-goal) | Deploy a OSGi-bundle into a
running Sling instance without requiring a project descriptor file. |
-| [sling:install-file](#the-install-file-goal) | Install a OSGi-bundle into a
running Sling instance without requiring a project descriptor file. |
+| [sling:deploy](#the-deploy-goal) | Deploy an OSGi-bundle into the OBR
running on a Sling instance. |
+| [sling:deploy-file](#the-deploy-file-goal) | Deploy an OSGi-bundle into the
OBR running on a Sling instance without requiring a project descriptor file. |
+| [sling:install-file](#the-install-file-goal) | Install an OSGi-bundle into a
running Sling instance without requiring a project descriptor file. |
## Usage
@@ -22,7 +21,7 @@ You should specify the version in your p
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-sling-plugin</artifactId>
- <version>2.0.5-SNAPSHOT</version>
+ <version>2.1.6</version>
</plugin>
...
</plugins>
@@ -32,7 +31,6 @@ You should specify the version in your p
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-sling-plugin</artifactId>
- <version>2.0.5-SNAPSHOT</version>
</plugin>
...
</plugins>
@@ -84,9 +82,9 @@ The `deploy` goal may be configured in t
| Parameter | Default Value | System Property Overwrite | Description |
|--|--|--|--|
| `skip` | `false` | `sling.deploy.skip` | Whether to skip this step even
though it has been configured in the project to be executed. The main use of
this setting is preventing deployment of the bundle to a Sling OSGi Bundle
Repository server if it is known that there is none or if such an upload is not
required. |
-| `buildDirectory` | `$\{project.build.directory`} | \- | The path of the file
to be installed |
-| `jarName` | `$\{project.build.finalName}.jar` | \- | The name of the file to
be installed |
-| `obr` | \- | `obr` | The URL of the running Sling instance to which the
bundle is installed. Note that this parameter is required and has no defualt
value. It must always be specified in the configuration section or on the
command line. |
+| `buildDirectory` | `${project.build.directory}` | \- | The path of the file
to be installed |
+| `jarName` | `${project.build.finalName}.jar` | \- | The name of the file to
be installed |
+| `obr` | \- | `obr` | The URL of the running Sling instance to which the
bundle is installed. Note that this parameter is required and has no default
value. It must always be specified in the configuration section or on the
command line. |
## The `deploy-file` goal
@@ -107,7 +105,7 @@ The `deploy-file` supports similar confi
| Parameter | Default Value | System Property Overwrite | Description |
|--|--|--|--|
-| `bundleFileName` |
`$\{project.build.directory}/$\{project.build.finalName}.jar` | `sling.file` |
The path and name of the file to be installed |
+| `bundleFileName` |
`${project.build.directory}/${project.build.finalName}.jar` | `sling.file` |
The path and name of the file to be installed |
| `obr` | \- | `obr` | The URL of the running Sling instance to which the
bundle is installed. Note that this parameter is required and has no defualt
value. It must always be specified in the configuration section or on the
command line. |
Example: To deploy the bundle file `someBundle.jar` to the OBR running at
`[http://obr.sample.org](http://obr.sample.org)` you might use the goal as
follows:
@@ -117,7 +115,7 @@ Example: To deploy the bundle file `some
## The `install` goal
-The `install` goal uploads a bundle to a running sling instance, which may be
located on a remote system. The plugin places an HTTP `POST` request to the
sling instance sending the bundle file together with flags indicating whether
to start the bundle and what start level to assign the bundle. It's also
possible to HTTP `PUT` instead of `POST` for WebDAV.
+The `install` goal uploads a bundle to a running sling instance, which may be
located on a remote system. The plugin places an HTTP `POST` request to [Felix
Web
Console](http://felix.apache.org/documentation/subprojects/apache-felix-web-console/web-console-restful-api.html#post-requests).
It's also possible to HTTP `PUT` instead of `POST` leveraging the [WebDAV
bundle from Sling]({{ refs.repository-based-development.path }}). Since version
2.1.8 you can also leverage the Sling POST servlet for that.
### Use
@@ -157,16 +155,15 @@ The `install` goal may be configured in
| Parameter | Default Value | System Property Overwrite | Description |
|--|--|--|--|
| `skip` | `false` | `sling.install.skip` | Whether to skip this step even
though it has been configured in the project to be executed. The main use of
this setting is preventing installation of the bundle to a running Sling
installation if it is known that there is none or if such an upload is not
required, for example when building the bundle in an automated build system
such as Confluence. |
-| `bundleFileName` |
`$\{project.build.directory}/$\{project.build.finalName}.jar` | `sling.file` |
The path and name of the file to be installed |
+| `bundleFileName` |
`${project.build.directory}/${project.build.finalName}.jar` | `sling.file` |
The path and name of the file to be installed |
| `bundleStart` | `true` | `sling.bundle.start` | Whether to start the bundle
after installing it. If the bundle is just updated, this parameter is ignored
even if the bundle is currently stopped |
| `bundleStartLevel` | `20` | `sling.bundle.startlevel` | The start level to
set on the installed bundle. If the bundle is already installed and therefore
is only updated this parameter is ignored. The parameter is also ignored if the
running Sling instance has no StartLevel service (which is unusual actually) |
-| `slingUrl` | `http{`}`://localhost:8080/sling` | `sling.url` | The URL of
the running Sling instance to which the bundle is installed |
+| `slingUrl` | `http://localhost:8080/sling` | `sling.url` | The URL of the
running Sling instance to which the bundle is installed |
| `user` | `admin` | `sling.user` | The name of the user to authenticate as
with the running Sling instance given by the `slingUrl` parameter |
| `password` | `admin` | `sling.password` | The password of the user to
authenticate as with the running Sling instance given by the `slingUrl`
parameter |
-| `usePut` | `false` | `sling.usePut` | If a simple HTTP PUT should be used
instead of the standard POST to the felix console. In the uninstall goal, a
HTTP DELETE will be used. |
-| `refreshPackages` | `true` | `sling.refreshPackages` | Whether to refresh
the packages after installing the uploaded bundle. If this property is set to
`true`, the `PackageAdmin.refreshPackages(Bundle\[\]({{ refs..path }}))` method
is called after installing or updating the bundle. |
-
-{anchor:install-file}
+| `deploymentMethod` | `WebConsole` | `sling.deploy.method` | Only available
since version 2.1.8 (see also
[SLING-5335](https://issues.apache.org/jira/browse/SLING-5335)). <br>Allowed
values:<br>**WebConsole**, uses the [Felix Web Console REST
API](http://felix.apache.org/documentation/subprojects/apache-felix-web-console/web-console-restful-api.html#post-requests)
for deployment (HTTP POST). This is the default. Make sure that `slingUrl`
points to the Felix Web Console in that case.<br>**WebDAV**, uses [WebDAV]({{
refs.repository-based-development.path }}) for deployment (HTTP PUT). Make sure
that `slingUrl` points to the entry path of the Sling WebDAV bundle (usually
below regular Sling root URL). Issues an HTTP Delete for the uninstall
goal.<br>**SlingPostServlet**, uses the [Sling Post Servlet]({{
refs.manipulating-content-the-slingpostservlet-servlets-post.path }}) for
deployment (HTTP POST). Make sure that `slingUrl` points a path which is
handled by the Sling POST Servlet (us
ually below regular Sling root URL). |
+| `usePut` | `false` | `sling.usePut` | If a simple HTTP PUT should be used
instead of the standard POST to the felix console. In the uninstall goal, a
HTTP DELETE will be used. Deprecated since version 2.1.8 (see also
[SLING-5335](https://issues.apache.org/jira/browse/SLING-5335)). Use
`deploymentMethod=WebDAV` instead. |
+| `refreshPackages` | `true` | `sling.refreshPackages` | Whether to refresh
the packages after installing the uploaded bundle. If this property is set to
`true`, the `PackageAdmin.refreshPackages(Bundle)` method is called after
installing or updating the bundle. |
## The `install-file` goal
@@ -190,8 +187,6 @@ Example: To upload the bundle file `some
$ mvn org.apache.sling:maven-sling-plugin:install-file
-Dsling.file=someBundle.jar
-{anchor:uninstall}
-
## The `uninstall` goal
The `uninstall` goal uninstalls a bundle from a running sling instance, which
may be located on a remote system. The plugin uninstalles a bundle via a HTTP
`POST{`}request. It's also possible to use HTTP `DELETE` instead of `POST` for
WebDAV.
@@ -233,13 +228,12 @@ The `uninstall` goal may be configured i
| Parameter | Default Value | System Property Overwrite | Description |
|--|--|--|--|
-| `bundleFileName` |
`$\{project.build.directory}/$\{project.build.finalName}.jar` | `sling.file` |
The path and name of the file to be uninstalled |
-| `slingUrl` | `http{`}`://localhost:8080/sling` | `sling.url` | The URL of
the running Sling instance to which the bundle should be uninstalled |
+| `bundleFileName` |
`${project.build.directory}/{project.build.finalName}.jar` | `sling.file` | The
path and name of the file to be uninstalled |
+| `slingUrl` | `http://localhost:8080/sling` | `sling.url` | The URL of the
running Sling instance on which the bundle should be uninstalled |
| `user` | `admin` | `sling.user` | The name of the user to authenticate as
with the running Sling instance given by the `slingUrl` parameter |
| `password` | `admin` | `sling.password` | The password of the user to
authenticate as with the running Sling instance given by the `slingUrl`
parameter |
-| `usePut` | `false` | `sling.usePut` | In the uninstall goal, a HTTP DELETE
will be used. |
-
-{anchor:validate}
+| `deploymentMethod` | `WebConsole` | `sling.deploy.method` | Only available
since version 2.1.8 (see also
[SLING-5335](https://issues.apache.org/jira/browse/SLING-5335)). <br>Allowed
values:<br>**WebConsole**, uses the [Felix Web Console REST
API](http://felix.apache.org/documentation/subprojects/apache-felix-web-console/web-console-restful-api.html#post-requests)
for deployment (HTTP POST). This is the default. Make sure that `slingUrl`
points to the Felix Web Console in that case.<br>**WebDAV**, uses [WebDAV]({{
refs.repository-based-development.path }}) for deployment (HTTP PUT). Make sure
that `slingUrl` points to the entry path of the Sling WebDAV bundle (usually
below regular Sling root URL). Issues an HTTP Delete for the uninstall
goal.<br>**SlingPostServlet**, uses the [Sling Post Servlet]({{
refs.manipulating-content-the-slingpostservlet-servlets-post.path }}) for
deployment (HTTP POST). Make sure that `slingUrl` points a path which is
handled by the Sling POST Servlet (us
ually below regular Sling root URL). |
+| `usePut` | `false` | `sling.usePut` | If a simple HTTP PUT should be used
instead of the standard POST to the felix console. In the uninstall goal, an
HTTP DELETE will be used. Deprecated since version 2.1.8 (see also
[SLING-5335](https://issues.apache.org/jira/browse/SLING-5335)). Use
`deploymentMethod=WebDAV` instead. |
## The `validate` goal