[
https://issues.apache.org/jira/browse/SLING-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Carsten Ziegeler resolved SLING-2905.
-------------------------------------
Resolution: Won't Fix
> 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
> Attachments: SLING-2905.patch
>
>
> 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 was sent by Atlassian Jira
(v8.20.10#820010)