...
Excerpt | ||
---|---|---|
| ||
How we could get the Sling Launcher to be updated through management interfaces such as the Felix Web Console or the Felix Shell. (IMPLEMENTED) |
Status: DRAFTIMPLEMENTED
Created: 10. January 2009
Author: fmeschbe
Updated: 13. January 2009, fmeschbe, Prototype implementation
...
I have prepared a prototype of this concept in my white board at http://svn.apache.org/repos/asf/incubator/sling/whiteboard/fmeschbe/launchpad.
The launchpad/base module creates two artifacts: The primary artifact is included with the final application. The secondary artifact is the actual launcher JAR file.
...
The secondary artifact is just what is the launchpad/base artifact today. The extension is just the support for the new API defined in the primary artifact. This secondary artifact is included as the launcher JAR in the final application.
6.3 Building the prototype
To build an test drive the prototype do the following:
1. Checkout the prototype:
No Format |
---|
$ svn checkout http://svn.apache.org/repos/asf/incubator/sling/whiteboard/fmeschbe/launchpad prototype
|
2. Build and locally install the base artifact
No Format |
---|
$ cd prototype/base
$ mvn clean install
|
This install three artifacts: the primary artifact later used as the launcher JAR and two secondary artifacts with classifier shared
and sources
. The shared
artifact is used by the app and webapp modules to get the Loader
class and the Notifiable
and Launcher
interfaces.
3. Build the standalone application
No Format |
---|
$ cd ../app
$ mvn -PwithBase,withBundles,withShell clean install
|
The module has three profiles, which are not enabled by default:
- withBase – Include the launcher JAR with the build
- withBundles – Include the Sling Bundles with the build
- withShell – Add the Apache Felix Shell and Shell Remote bundles
You may omit the withShell profile, but generally want to include the withBase and withBundles artifacts. These profiles will also later be enabled by default.
The standalone application can of course directly be used by launching it with
No Format |
---|
$ java -jar target/org.apache.sling.launchpad.app-5-incubator-SNAPSHOT.jar
|
4. Build the Web Application
The web application depends on the standalone application to share the list of bundles included. The web application is easily built by
No Format |
---|
$ cd ../webapp
$ mvn clean install
|
This creates the web application.
Note: The web application also contains support for SLING-711. This results in modified behaviour for the definition for the defualt sling.home value. Previously the system property sling.home was considered if no sling.home servlet init-param or context init-param was available with a final fallback to "sling". Now the system property is ignored altogether and the default value is derived from the servlet context path as sling/<path> where <path> is the servlet context path with all slashes replaced by underscores and the root context being a single underscore. For example: If Sling is running in the context /sling the defualt sling.home is sling/_sling.