At least the https://github.com/apache/sling-scriptingbundle-maven-plugin 
<https://github.com/apache/sling-scriptingbundle-maven-plugin> always creates 
absolute resource types. I created 
https://issues.apache.org/jira/browse/SLING-10688 
<https://issues.apache.org/jira/browse/SLING-10688> for also optionally 
creating relative resource types...
Still this would rather be a workaround because I would assume that for bundled 
scripts it often makes sense to provide the capability with an absolute path 
while requiring the capability with a relative path (to allow overlays). But 
that would obviously never match in OSGi....

Konrad

> On 29. Jul 2021, at 16:55, Konrad Windszus <[email protected]> wrote:
> 
> Hi,
> With bundled scripts the extends attribute of the sling.servlet capability 
> defines the resource type one extends 
> (https://github.com/apache/sling-org-apache-sling-servlets-resolver#how 
> <https://github.com/apache/sling-org-apache-sling-servlets-resolver#how>).
> It is not specified though if the resource type should be absolute (i.e. 
> start with a "/") or can be relative (and is looked up by prefixing it with 
> any of the resource resolver search paths) but I guess it is the former.
> I know that resource resolver search paths are not directly related to 
> servlet resolving from bundles but they are extremely handy as they allow to 
> overlay scripts from "/libs" in "/apps".
> 
> How can the same be achieved with bundled scripts?
> I don't want to depend on bundle loading order and have a predictable servlet 
> resolution. 
> What is the recommended way to globally overlay a bundled script from another 
> bundle?
> 
> Thanks,
> Konrad
> 

Reply via email to