You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2021/08/02 13:43:00 UTC

[jira] [Commented] (SLING-10688) Support creating relative resource paths

    [ https://issues.apache.org/jira/browse/SLING-10688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17391598#comment-17391598 ] 

Konrad Windszus commented on SLING-10688:
-----------------------------------------

This has been clarified meanwhile in https://lists.apache.org/thread.html/r71baae67b7e491d93d0aac1b936ac133700730c244328ec2e80ff4e5%40%3Cdev.sling.apache.org%3E. The maven plugin already creates absolute and relative path based resource type.

The logic of 

bq. prefixing them with the local property sling.servlet.prefix or if not set by the OSGi configuration property servletresolver.servletRoot of PID org.apache.sling.servlets.resolver.SlingServletResolver

is not applicable to bundled scripts.

> Support creating relative resource paths
> ----------------------------------------
>
>                 Key: SLING-10688
>                 URL: https://issues.apache.org/jira/browse/SLING-10688
>             Project: Sling
>          Issue Type: Improvement
>          Components: Maven Plugins and Archetypes
>    Affects Versions: Scripting Bundle Maven Plugin 0.3.0
>            Reporter: Konrad Windszus
>            Priority: Major
>             Fix For: Scripting Bundle Maven Plugin 0.4.0
>
>
> The servlet resolver supports registering servlets for relative paths/resource types. Those are made absolute by prefixing them with the local property {{sling.servlet.prefix}} or if not set by the OSGi configuration property {{servletresolver.servletRoot}} of PID {{org.apache.sling.servlets.resolver.SlingServletResolver}}
> (https://sling.apache.org/documentation/the-sling-engine/servlets.html)
> The Sling Scripting Bundle Maven Plugin on the other hand always creates an absolute path for the Provide-Capability attribute {{sling.servlet.resourceTypes}}.
> On the other hand it would be helpful to define Require-Capability with relative resource types (to allow overlays). Unfortunately OSGi will only match them if the attribute value of the provided and required capability are always the same!
> Therefore the Scripting Bundle Maven Plugin should optionally create {{sling.servlet.resourceTypes}} values not starting with {{/}}!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)