Allow for better configuration of sling home folder
---------------------------------------------------

                 Key: SLING-2203
                 URL: https://issues.apache.org/jira/browse/SLING-2203
             Project: Sling
          Issue Type: Improvement
          Components: Launchpad
    Affects Versions: Launchpad Base 2.3.0
            Reporter: Felix Meschberger
            Assignee: Felix Meschberger
             Fix For: Launchpad Base 2.3.2


Currently a few files and folders in the ${sling.home} folder can be more 
freely located than others:

  * The org.apache.sling.launchpad.base.jar file is expected inside 
${sling.home}, hardcoded
  * The sling.properties file is expected inside ${sling.home}, hardcoded
  * The start folder containing initial bundles to install is expected inside 
${sling.home}, hardcoded
  * The Felix framework cache location is configured by the 
org.osgi.framework.storage property
  * The location of Configuration Admin configuration is configured by the 
felix.cm.dir property
  * The location for File Installer (of the OSGi Install facility) is 
configured by the sling.installer.dir property

To have more flexibility, two new properties should be added:

* sling.properties (default: ${sling.home}/sling.properties) -- Provides the 
path and name of the sling.properties file contains the configurable properties 
used for starting Sling and then becoming Framework properties accessible with 
the BundleContext.getProperty(String) method. This property itself is also 
available as a Framework property and will be set to the default value by the 
Sling Launcher if not already set. The property must not contain a reference to 
another property but if it is not an absolute path, it is resolved against 
${sling.home}.

* sling.launchpad (default: ${sling.home}) Defines the location of Sling 
Launchpad related files and folders. At the moment this is the location of the 
org.apache.sling.launchpad.base.jar library which provides the OSGi Framework 
and the startup folder which takes bundles to install on framework startup. The 
property must not contain a reference to another property but if it is not an 
absolute path, it is resolved against ${sling.home}.

The defaults are defined such, that they account for backwards compatibility.

>From a little code inspection, probably the following areas have to be updated:
  * The Sling class must ensure the property values
  * The Sling class (loadConfigProperties method) must be modified to read the 
sling.properties file from the location indicated by the ${sling.properties} 
property
  * The Launcher class must be modified to look for and place the launcher jar 
in the ${sling.launchpad} folder (instead of ${sling.home})
  * The BootstrapInstaller class must be modified to expect bundles in the 
${sling.launchpad}/startup folder

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to