You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Stefan Seifert (JIRA)" <ji...@apache.org> on 2015/05/29 23:23:17 UTC

[jira] [Created] (SLING-4766) Provisioning Model does not support adding variables to Sling Settings

Stefan Seifert created SLING-4766:
-------------------------------------

             Summary: Provisioning Model does not support adding variables to Sling Settings
                 Key: SLING-4766
                 URL: https://issues.apache.org/jira/browse/SLING-4766
             Project: Sling
          Issue Type: Bug
          Components: General
    Affects Versions: Sling Provisioning Model 1.1.0
            Reporter: Stefan Seifert
             Fix For: Sling Provisioning Model 1.1.2


the provisioning model supports resolving variables to values defined in the model itself in the \[variables\] section.

in the \[settings\] it is sometimes required to insert variables that should not be resolved when parsing the model, but should be written as variable to the resulting sling.properties file.

this is already supported for {{$\{sling.home\}}} - but for nothing else as it seems.

example what does not work - override the boot delegation
{noformat}
  org.osgi.framework.bootdelegation=com.yourkit.*, com.wily.*, ${org.apache.sling.launcher.bootdelegation}
{noformat}

this fails with an error
{noformat}
[ERROR] Internal error: java.lang.IllegalArgumentException: Unknown variable: org.apache.sling.launcher.bootdelegation -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.IllegalArgumentException: Unknown variable: org.apache.sling.launcher.bootdelegation
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:166)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.IllegalArgumentException: Unknown variable: org.apache.sling.launcher.bootdelegation
        at org.apache.sling.provisioning.model.ModelUtility.replace(ModelUtility.java:336)
        at org.apache.sling.provisioning.model.ModelUtility.getEffectiveModel(ModelUtility.java:286)
        at org.apache.sling.maven.slingstart.DependencyLifecycleParticipant.addDependencies(DependencyLifecycleParticipant.java:149)
        at org.apache.sling.maven.slingstart.DependencyLifecycleParticipant.addDependencies(DependencyLifecycleParticipant.java:124)
        at org.apache.sling.maven.slingstart.DependencyLifecycleParticipant.afterProjectsRead(DependencyLifecycleParticipant.java:119)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:310)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
        ... 11 more
{noformat}

we should introduce some sort of escaping syntax for special chars in the settings value to support other variables than sling.home as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)