[
https://issues.apache.org/jira/browse/SLING-357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585792#action_12585792
]
Felix Meschberger commented on SLING-357:
-----------------------------------------
Implemented first step (bang separator) in Rev. 644887.
> Support simple path mappings for bundle provided resources
> ----------------------------------------------------------
>
> Key: SLING-357
> URL: https://issues.apache.org/jira/browse/SLING-357
> Project: Sling
> Issue Type: Improvement
> Components: Resource
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: 2.0.0
>
>
> Currently the bundle provided resources are provided in the Resource tree
> with the same path. This is mostly ok, but poses some issues, if the bundle
> provides compiled classes of certain scripting languages such as JSP or
> Scala. In this case, the classes are expected below /var/classes, while the
> bundle provides them under /.
> To support showing these classes under /var/classes a simple path mapping
> scheme is to be added to the BundleResourceProvider which allows to specify
> such prefixes.
> Two syntaxes are conceivable:
> (1) Special separator between the resource path prefix and the rest of the
> path. For example to provide classes from the sample package located at
> /sample in bundle to Sling, bundle resource provider configuration string
> would be "/var/classes!/sample" Here the full path would be the one to use in
> the repository and the part after the "!" would be the bundle entry path.
> A corrolary to this first syntax could be define a special prefix - e.g.
> ${classes}! - to denote script classes to be prefixed with a configurable
> value, such as /var/classes. This would have the benefit of allowing flexible
> mapping of these resources at run time instead of fixing it at compile time,
> which may be problematic.
> (2) A bundle resource path is actually an assignment of the bundle entry
> prath to the mapped resource path. For example to provide classes from the
> sample package located at /sample in bundle to Sling, bundle resource
> provider configuration string would be "/sample=/var/classes!/sample".
> Again, we should allow a special value in the right hand side to denote the
> class path.
> The first syntax IMHO is very simple and allows minimizing typing work, while
> the second syntax is more flexible as it supports complete remapping of
> bundle entry path prefix to resource path.
> In a first step, I will implement the first syntax with the additional
> ${classes} support.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.