You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2013/06/05 11:24:22 UTC

[jira] [Created] (SLING-2905) Providing extra properties via sling_install.properties does not work

Chetan Mehrotra created SLING-2905:
--------------------------------------

             Summary: Providing extra properties via sling_install.properties does not work
                 Key: SLING-2905
                 URL: https://issues.apache.org/jira/browse/SLING-2905
             Project: Sling
          Issue Type: Bug
          Components: Launchpad
    Affects Versions:  Launchpad Base 2.2.0
            Reporter: Chetan Mehrotra
            Priority: Minor


For my case I need to add extra packages to Sling Bootdelegation package list without modifying the Sling based application. Sling enables providing extra properties during startup by adding sling_install.properties under Sling Home directory. This logic however does not work currently as expected.

As per Sling#loadIncludes [1] the inclusion logic would remove the keys referring to includes irrespective of the fact that include has been resolved or not. Currently following sequence happens at startup

1. Sling.loadConfigProperties invokes  this.loadIncludes(staticProps, null /*Sling Home*/); passing null for Sling Home as it has not been resolved by now
2. The Sling.loadIncludes would try to resolve the include. However as the Sling Home is not set the inclusion would not work and key itself would also be removed from the config
3. Sling.loadConfigProperties again invokes this.loadIncludes(runtimeProps, slingHome); this time passing the Sling Home. However by now the include properties have already been removed and this inclusion would not work again.

One possible fix is to remove the inclusion key only if the file is included.

As a workaround I had to specify the extra packages via system property 

-Dorg.apache.sling.launcher.bootdelegation=,sun.misc

[1] https://github.com/apache/sling/blob/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/Sling.java#L761

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira