Re: [DISCUSS] Resource Mapping SPI

2020-09-03 Thread Carsten Ziegeler

Hi Georg,



One question though:


PathRewriterFactory

So this class is currently called ResourceUriMappingChain and it is
*not* a factory - it is a regular OSG service that does not hold
any state as member variables - did you have a particular reason in
mind why it should be a factory or was this just following the
pattern from the ResourceResolver?
I wanted to have a factory that allows to create a PathRewriter which 
contains a servlet request - this way such a PathRewriter can be created 
for every incoming request as a first step and then simply be passed - 
in my case to the ResourceResolverFactory and then the ResourceResolver.
This way if you use the PathRewriter from the ResourceResolver it 
already has the right context (request).


I thought it might be useful to manage some state (request in this case) 
on the PathRewriter.


Regards
Carsten

--
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org


[Jenkins] Sling » Modules » sling-org-apache-sling-launchpad-testing » master #79 is FIXED

2020-09-03 Thread Apache Jenkins Server
Please see 
https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-launchpad-testing/job/master/79/
 for details.

No further emails will be sent until the status of the build is changed.

[Jenkins] Sling » Modules » sling-org-apache-sling-launchpad-testing » master #77 is BROKEN

2020-09-03 Thread Apache Jenkins Server
Please see 
https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-launchpad-testing/job/master/77/
 for details.

No further emails will be sent until the status of the build is changed.
Build log follows below:

[...truncated 1646 lines...]
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.servlets.post.PostResponseCreatorTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 s 
- in 
org.apache.sling.launchpad.webapp.integrationtest.servlets.post.PostResponseCreatorTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.DavExIntegrationTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.627 s 
- in org.apache.sling.launchpad.webapp.integrationtest.DavExIntegrationTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.teleporter.MultipleRulesTeleporterTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.303 s 
- in 
org.apache.sling.launchpad.webapp.integrationtest.teleporter.MultipleRulesTeleporterTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.teleporter.TeleportedResourcesFolderTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.455 s 
- in 
org.apache.sling.launchpad.webapp.integrationtest.teleporter.TeleportedResourcesFolderTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.SlingWebDavServletTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.148 s 
- in org.apache.sling.launchpad.webapp.integrationtest.SlingWebDavServletTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.accessManager.AccessPrivilegesInfoTest
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.376 s 
- in 
org.apache.sling.launchpad.webapp.integrationtest.accessManager.AccessPrivilegesInfoTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.WebdavUploadTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.285 s 
- in org.apache.sling.launchpad.webapp.integrationtest.WebdavUploadTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.PropertyRenderingTest
[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.197 s 
- in org.apache.sling.launchpad.webapp.integrationtest.PropertyRenderingTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.servlets.post.PostServletAtMoveTest
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.364 s 
- in 
org.apache.sling.launchpad.webapp.integrationtest.servlets.post.PostServletAtMoveTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.servlets.post.PostServletPatchTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.115 s 
- in 
org.apache.sling.launchpad.webapp.integrationtest.servlets.post.PostServletPatchTest
[INFO] Running org.apache.sling.launchpad.webapp.integrationtest.IncludeTest
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.815 s 
- in org.apache.sling.launchpad.webapp.integrationtest.IncludeTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.accessManager.ModifyAceTest
[INFO] Tests run: 22, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.574 s 
- in 
org.apache.sling.launchpad.webapp.integrationtest.accessManager.ModifyAceTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.servlets.post.PostServletOrderTest
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.475 s 
- in 
org.apache.sling.launchpad.webapp.integrationtest.servlets.post.PostServletOrderTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.ExportedPackagesTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 s 
- in org.apache.sling.launchpad.webapp.integrationtest.ExportedPackagesTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.issues.SLING2522Test
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 s 
- in org.apache.sling.launchpad.webapp.integrationtest.issues.SLING2522Test
[INFO] Running org.apache.sling.launchpad.webapp.integrationtest.MkdirTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.118 s 
- in org.apache.sling.launchpad.webapp.integrationtest.MkdirTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.accessManager.RemoveAcesTest
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.811 s 
- in 
org.apache.sling.launchpad.webapp.integrationtest.accessManager.RemoveAcesTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.StreamServletTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.255 s 
- in org.apache.sling.launchpad.webapp.integrationtest.StreamServletTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.servlets.resolution.RequestObjectTest
[INFO] Tests run: 1, Failures: 

[Jenkins] Sling » Modules » sling-org-apache-sling-launchpad-testing » master #78 is BROKEN

2020-09-03 Thread Apache Jenkins Server
Please see 
https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-launchpad-testing/job/master/78/
 for details.

No further emails will be sent until the status of the build is changed.
Build log follows below:

[...truncated 1633 lines...]
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 s 
- in org.apache.sling.launchpad.webapp.integrationtest.StaticContentTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.servlets.post.PostResponseCreatorTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 s 
- in 
org.apache.sling.launchpad.webapp.integrationtest.servlets.post.PostResponseCreatorTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.DavExIntegrationTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.614 s 
- in org.apache.sling.launchpad.webapp.integrationtest.DavExIntegrationTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.teleporter.MultipleRulesTeleporterTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.347 s 
- in 
org.apache.sling.launchpad.webapp.integrationtest.teleporter.MultipleRulesTeleporterTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.teleporter.TeleportedResourcesFolderTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.368 s 
- in 
org.apache.sling.launchpad.webapp.integrationtest.teleporter.TeleportedResourcesFolderTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.SlingWebDavServletTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.186 s 
- in org.apache.sling.launchpad.webapp.integrationtest.SlingWebDavServletTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.accessManager.AccessPrivilegesInfoTest
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.381 s 
- in 
org.apache.sling.launchpad.webapp.integrationtest.accessManager.AccessPrivilegesInfoTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.WebdavUploadTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.273 s 
- in org.apache.sling.launchpad.webapp.integrationtest.WebdavUploadTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.PropertyRenderingTest
[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.215 s 
- in org.apache.sling.launchpad.webapp.integrationtest.PropertyRenderingTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.servlets.post.PostServletAtMoveTest
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.413 s 
- in 
org.apache.sling.launchpad.webapp.integrationtest.servlets.post.PostServletAtMoveTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.servlets.post.PostServletPatchTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.119 s 
- in 
org.apache.sling.launchpad.webapp.integrationtest.servlets.post.PostServletPatchTest
[INFO] Running org.apache.sling.launchpad.webapp.integrationtest.IncludeTest
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.67 s - 
in org.apache.sling.launchpad.webapp.integrationtest.IncludeTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.accessManager.ModifyAceTest
[INFO] Tests run: 22, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.453 s 
- in 
org.apache.sling.launchpad.webapp.integrationtest.accessManager.ModifyAceTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.servlets.post.PostServletOrderTest
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.488 s 
- in 
org.apache.sling.launchpad.webapp.integrationtest.servlets.post.PostServletOrderTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.ExportedPackagesTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 s 
- in org.apache.sling.launchpad.webapp.integrationtest.ExportedPackagesTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.issues.SLING2522Test
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.009 s 
- in org.apache.sling.launchpad.webapp.integrationtest.issues.SLING2522Test
[INFO] Running org.apache.sling.launchpad.webapp.integrationtest.MkdirTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.119 s 
- in org.apache.sling.launchpad.webapp.integrationtest.MkdirTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.accessManager.RemoveAcesTest
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.765 s 
- in 
org.apache.sling.launchpad.webapp.integrationtest.accessManager.RemoveAcesTest
[INFO] Running 
org.apache.sling.launchpad.webapp.integrationtest.StreamServletTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.247 s 
- in 

[GitHub] [sling-org-apache-sling-jcr-oak-server] sonarcloud[bot] commented on pull request #4: SLING-9719 Utilize any available oak EditorProvider components that were declared

2020-09-03 Thread GitBox


sonarcloud[bot] commented on pull request #4:
URL: 
https://github.com/apache/sling-org-apache-sling-jcr-oak-server/pull/4#issuecomment-686833672


   Kudos, SonarCloud Quality Gate passed!
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-oak-server=4=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-oak-server=4=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-oak-server=4=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-oak-server=4=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-oak-server=4=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-oak-server=4=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-oak-server=4=false
 ypes=SECURITY_HOTSPOT) [0 Security 
Hotspots](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-oak-server=4=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-oak-server=4=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-oak-server=4=false=CODE_SMELL)
 [1 Code 
Smell](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-oak-server=4=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-oak-server=4=new_coverage=list)
 [80.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-oak-server=4=new_coverage=list)
  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-oak-server=4=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-oak-server=4=new_duplicated_lines_density=list)
   
The version of Java (1.8.0_252) you 
have used to run this analysis is deprecated and we will stop accepting it from 
October 2020. Please update to at least Java 11.
   Read more [here](https://sonarcloud.io/documentation/upcoming/)
   
   
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Commented] (SLING-9719) Utilize any available oak EditorProvider components that were declared

2020-09-03 Thread Eric Norman (Jira)


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

Eric Norman commented on SLING-9719:


I've staged pull request #4 with the changes at: 
[https://github.com/apache/sling-org-apache-sling-jcr-oak-server/pull/4]

If there are no objections in a few days, I'll try merging the PR to the 
mainline.

> Utilize any available oak EditorProvider components that were declared
> --
>
> Key: SLING-9719
> URL: https://issues.apache.org/jira/browse/SLING-9719
> Project: Sling
>  Issue Type: Improvement
>Reporter: Eric Norman
>Assignee: Eric Norman
>Priority: Major
> Fix For: JCR Oak Server 1.2.8
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> {{OakSlingRepositoryManager}} is not utilizing the {{EditorProvider}} 
> components provided by bundles.
> To better align with the oak-jcr RepositoryManager implementation, the sling 
> impl should also utilize the WhiteboardEditorProvider to listen for and 
> utilize any registered EditorProvider components that are available.
> This change will automatically enable support for {{mix:atomicCounter}} via 
> the {{AtomicCounterEditorProvider}} that's not used at the moment.
>  



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


[jira] [Commented] (SLING-8309) Allow adding CommitHooks and EditorProviders dynamically from bundles

2020-09-03 Thread Eric Norman (Jira)


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

Eric Norman commented on SLING-8309:


FYI: I see no objections to my July comment so I opened SLING-9719 which is 
similar to this one but with a smaller scope where dynamic CommitHooks were not 
considered.

If there is consensus that dynamic CommitHooks are not a good idea then perhaps 
this issue should be closed and the dynamic EditorProvider support can be 
handled by the SLING-9719 changes?

> Allow adding CommitHooks and EditorProviders dynamically from bundles
> -
>
> Key: SLING-8309
> URL: https://issues.apache.org/jira/browse/SLING-8309
> Project: Sling
>  Issue Type: Improvement
>  Components: Oak
>Reporter: Sergiu Dumitriu
>Priority: Major
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> Currently, {{OakSlingRepositoryManager}} uses a hard-coded list of 
> {{CommitHook}} and {{EditorProvider}} to be used by the Oak repository. This 
> means that other than building a patched version of 
> {{OakSlingRepositoryManager}} there's no way to include a new commit 
> observer. Ideally, a single pseudo-\{{CommitHook}} and 
> pseudo-\{{EditorProvider}} should be handled to Oak, and these should just 
> dynamically aggregate all the {{CommitHook}} and {{EditorProvider}} instances 
> registered in the {{Whiteboard}}.
> All the currently hardcoded components are already available in the 
> whiteboard, so no functionality will be lost, but this change will 
> automatically enable support for {{mix:atomicCounter}} via the 
> {{AtomicCounterEditorProvider}} that's not used at the moment.
> The old behavior should still be available via a new configuration, 
> {{OakSlingRepositoryManagerConfiguration#dynamic_components}}.



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


[GitHub] [sling-org-apache-sling-jcr-oak-server] enapps-enorman opened a new pull request #4: SLING-9719 Utilize any available oak EditorProvider components that were declared

2020-09-03 Thread GitBox


enapps-enorman opened a new pull request #4:
URL: https://github.com/apache/sling-org-apache-sling-jcr-oak-server/pull/4


   OakSlingRepositoryManager was not utilizing the EditorProvider components 
provided by bundles.
   
   To better align with the oak-jcr RepositoryManager implementation, the sling 
impl now will also utilize the WhiteboardEditorProvider to listen for and 
utilize any registered EditorProvider components that are available.
   
   This change will automatically enable support for mix:atomicCounter via the 
AtomicCounterEditorProvider that was not used before.
   




This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Created] (SLING-9719) Utilize any available oak EditorProvider components that were declared

2020-09-03 Thread Eric Norman (Jira)
Eric Norman created SLING-9719:
--

 Summary: Utilize any available oak EditorProvider components that 
were declared
 Key: SLING-9719
 URL: https://issues.apache.org/jira/browse/SLING-9719
 Project: Sling
  Issue Type: Improvement
Reporter: Eric Norman
Assignee: Eric Norman
 Fix For: JCR Oak Server 1.2.8


{{OakSlingRepositoryManager}} is not utilizing the {{EditorProvider}} 
components provided by bundles.

To better align with the oak-jcr RepositoryManager implementation, the sling 
impl should also utilize the WhiteboardEditorProvider to listen for and utilize 
any registered EditorProvider components that are available.

This change will automatically enable support for {{mix:atomicCounter}} via the 
{{AtomicCounterEditorProvider}} that's not used at the moment.

 



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


[jira] [Comment Edited] (SLING-9718) Relative paths for bundled HTL template files are not correctly handled

2020-09-03 Thread Radu Cotescu (Jira)


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

Radu Cotescu edited comment on SLING-9718 at 9/3/20, 5:03 PM:
--

Fixed in [commit 
65c4814|https://github.com/apache/sling-org-apache-sling-scripting-sightly/commit/65c4814],
 added tests in [commit 
cef5f6a|https://github.com/apache/sling-org-apache-sling-scripting-bundle-tracker-it/commit/cef5f6a].


was (Author: radu.cotescu):
Fixed in [commit 
65c4814|[https://github.com/apache/sling-org-apache-sling-scripting-sightly/commit/65c4814],]
 added tests in [commit 
cef5f6a|https://github.com/apache/sling-org-apache-sling-scripting-bundle-tracker-it/commit/cef5f6a].

> Relative paths for bundled HTL template files are not correctly handled
> ---
>
> Key: SLING-9718
> URL: https://issues.apache.org/jira/browse/SLING-9718
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting HTL Engine 1.4.0-1.4.0
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting HTL Engine 1.4.4-1.4.0
>
>
> If a template library (a file providing one or more HTL templates) is bundled 
> (precompiled or not) and is loaded by a caller using a relative path, the 
> loading might fail if the lookup is done via the 
> {{org.apache.sling.scripting.sightly.impl.engine.bundled.BundledUnitManagerImpl#getRenderUnit(javax.script.Bindings,
>  java.lang.String)}} service method.



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


[jira] [Resolved] (SLING-9718) Relative paths for bundled HTL template files are not correctly handled

2020-09-03 Thread Radu Cotescu (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9718?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Radu Cotescu resolved SLING-9718.
-
Resolution: Fixed

Fixed in [commit 
65c4814|[https://github.com/apache/sling-org-apache-sling-scripting-sightly/commit/65c4814],]
 added tests in [commit 
cef5f6a|https://github.com/apache/sling-org-apache-sling-scripting-bundle-tracker-it/commit/cef5f6a].

> Relative paths for bundled HTL template files are not correctly handled
> ---
>
> Key: SLING-9718
> URL: https://issues.apache.org/jira/browse/SLING-9718
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting HTL Engine 1.4.0-1.4.0
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting HTL Engine 1.4.4-1.4.0
>
>
> If a template library (a file providing one or more HTL templates) is bundled 
> (precompiled or not) and is loaded by a caller using a relative path, the 
> loading might fail if the lookup is done via the 
> {{org.apache.sling.scripting.sightly.impl.engine.bundled.BundledUnitManagerImpl#getRenderUnit(javax.script.Bindings,
>  java.lang.String)}} service method.



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


[jira] [Created] (SLING-9718) Relative paths for bundled HTL template files are not correctly handled

2020-09-03 Thread Radu Cotescu (Jira)
Radu Cotescu created SLING-9718:
---

 Summary: Relative paths for bundled HTL template files are not 
correctly handled
 Key: SLING-9718
 URL: https://issues.apache.org/jira/browse/SLING-9718
 Project: Sling
  Issue Type: Bug
  Components: Scripting
Affects Versions: Scripting HTL Engine 1.4.0-1.4.0
Reporter: Radu Cotescu
Assignee: Radu Cotescu
 Fix For: Scripting HTL Engine 1.4.4-1.4.0


If a template library (a file providing one or more HTL templates) is bundled 
(precompiled or not) and is loaded by a caller using a relative path, the 
loading might fail if the lookup is done via the 
{{org.apache.sling.scripting.sightly.impl.engine.bundled.BundledUnitManagerImpl#getRenderUnit(javax.script.Bindings,
 java.lang.String)}} service method.



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


Re: [VOTE] Release Apache Sling Feature Model Analyser 1.3.8

2020-09-03 Thread Georg Henzler

+1

Georg

On 2020-09-03 13:17, Carsten Ziegeler wrote:

+1

Carsten

Am 03.09.2020 um 12:10 schrieb Robert Munteanu:

Hi,

We solved 1 issue in this release:
https://issues.apache.org/jira/browse/SLING/fixforversion/12348716

Staging repository:
https://repository.apache.org/content/repositories/orgapachesling-2326/

You can use this UNIX script to download the release and verify the 
signatures:

https://gitbox.apache.org/repos/asf?p=sling-tooling-release.git;a=blob;f=check_staged_release.sh;hb=HEAD

Usage:
sh check_staged_release.sh 2326 /tmp/sling-staging

Please vote to approve this release:

   [ ] +1 Approve the release
   [ ]  0 Don't care
   [ ] -1 Don't release, because ...

This majority vote is open for at least 72 hours.

Regards,
Robert Munteanu



Re: [DISCUSS] Resource Mapping SPI

2020-09-03 Thread Georg Henzler

Hi Carsten,

so this is very similar to what I have on [1] already. I was busy
with other things this week but I'll start now to fix the conflicts
from the merges of SLING-9620 and SLING-9623. Also I'll move the SPI
package underneath org.apache.sling.spi and I'll try to incorporate
your ideas from branch pathmappingproposal.

One question though:


PathRewriterFactory

So this class is currently called ResourceUriMappingChain and it is
*not* a factory - it is a regular OSG service that does not hold
any state as member variables - did you have a particular reason in
mind why it should be a factory or was this just following the
pattern from the ResourceResolver?

-Georg

[1] 
https://github.com/apache/sling-org-apache-sling-api/blob/feature/Resource_Mapping_SPI/src/main/java/org/apache/sling/api/resource/mapping/spi/ResourceMapping.java



On 2020-09-02 14:19, Carsten Ziegeler wrote:

Hi,

in order to make it simpler to understand my proposal, I created an
api prototype [1]. It's really just to demonstrate - nothing else. For
class / method names, I just picked the first that came to my mind.

PathMapper is the SPI
(https://github.com/apache/sling-org-apache-sling-api/blob/feature/pathmappingproposal/src/main/java/org/apache/sling/spi/resource/mapping/PathMapper.java)
- I just a simpler String based interface - again just for
demonstration; it doesn't mean that the current proposed Resource
Mapping SPI is bad; but I want to focus on the overall design first.
The services implementing the SPI are called in a chain, the
difference to the current proposal is that they do not have access to
a ResourceResolver via the context/parameters

PathRewriterFactory
(https://github.com/apache/sling-org-apache-sling-api/blob/feature/pathmappingproposal/src/main/java/org/apache/sling/api/resource/mapping/PathRewriterFactory.java)
creates PathRewriter objects - either with or without a servlet
request.

The PathRewriter invokes the chain from above for mapping and reverse 
mapping.


ResourceResolver gets two new methods
(https://github.com/apache/sling-org-apache-sling-api/blob/feature/pathmappingproposal/src/main/java/org/apache/sling/api/resource/ResourceResolver.java#L198-205)
- one to just invoke the resolving part and one to get the associated
PathRewriter (which can be passed in via the RRF).

The map/resolve methods get deprecated, they will internally call the
PathRewriter.


Regards
Carsten



[1]
https://github.com/apache/sling-org-apache-sling-api/tree/feature/pathmappingproposal

Am 26.08.2020 um 10:10 schrieb Carsten Ziegeler:

Hi Georg,

Am 25.08.2020 um 18:53 schrieb Georg Henzler:



We should have an API that can be used for this, whether this is
rr.map() or something new is a different question. I have no problem
with having rr.map() doing this.


I'm in favour of not introducing a new API if it's not absolutely
needed. But calling out to another service from rr.map()/rr.resolve()
should work fine.

We need at least one new method for rr which replaces resolve() and 
only does resolving without mapping - as resolving would already be 
done pre authentication.




Ok fair enough - so your point was that the both map() and resolve()
do not (or should not) produce different results based on the user
context, my point was that to be future proof in the SPI, we need
"access to the repository" to address all use cases. So "that 
service"

in the current implementation would be ResourceUriMappingChain [1],
it currently has access to a rr via
MappingChainContext.getResourceResolver() [2] - I think a resolver
needs to be available to do lookups in the repository, but this
could also be one based on a service user (ready only rights on
the whole repo suffice).


Yes, ResourceUriMappingChain  would be such a service - but the 
methods would not have a RR as a argument but we would use a service 
user inside the implementation (which is then passed on using 
MappingChainContext).


Lets leave out the naming discussion for now, but my idea was to have 
a

ResourceUriMappingChainFactory as a service and that one creates new
ResourceUriMappingChain objects. An optional argument to the factory 
is the current request - so the request will be stored inside a 
ResourceUriMappingChain and there is no need to pass it to each and 
every call of a method of ResourceUriMappingChain.




So to start with it it could work fine to
hook in ResourceUriMappingChain.resolve() in the request processing
before the resource resolver is created.


Yes, something along those lines


Maybe then in the future
we could provide a service property to ResourceToUriMapping providers
that allows to be called with the request's user context after the
resource resolver is created (so moving the default mapping chain
before the authentication at least does not block the possibility
to allow user based resolutions for the future).


I think this is where it gets dangerous :) If we allow for user based 
mapping later on, then clearly calling the 

Re: [VOTE] Release Apache Sling Feature Model Analyser 1.3.8

2020-09-03 Thread Carsten Ziegeler

+1

Carsten

Am 03.09.2020 um 12:10 schrieb Robert Munteanu:

Hi,

We solved 1 issue in this release:
https://issues.apache.org/jira/browse/SLING/fixforversion/12348716

Staging repository:
https://repository.apache.org/content/repositories/orgapachesling-2326/

You can use this UNIX script to download the release and verify the signatures:
https://gitbox.apache.org/repos/asf?p=sling-tooling-release.git;a=blob;f=check_staged_release.sh;hb=HEAD

Usage:
sh check_staged_release.sh 2326 /tmp/sling-staging

Please vote to approve this release:

   [ ] +1 Approve the release
   [ ]  0 Don't care
   [ ] -1 Don't release, because ...

This majority vote is open for at least 72 hours.

Regards,
Robert Munteanu



--
--
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org


Re: [VOTE] Release Apache Sling Feature Model Analyser 1.3.8

2020-09-03 Thread davidb
+1

David

On Thu, 3 Sep 2020 at 11:11, Robert Munteanu  wrote:

> On Thu, 2020-09-03 at 10:10 +, Robert Munteanu wrote:
> > Please vote to approve this release:
>
> +1
> Robert
>


[Jenkins] Sling » Modules » sling-org-apache-sling-launchpad-testing » master #74 is FIXED

2020-09-03 Thread Apache Jenkins Server
Please see 
https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-launchpad-testing/job/master/74/
 for details.

No further emails will be sent until the status of the build is changed.

Re: [VOTE] Release Apache Sling Feature Model Analyser 1.3.8

2020-09-03 Thread Robert Munteanu
On Thu, 2020-09-03 at 10:10 +, Robert Munteanu wrote:
> Please vote to approve this release:

+1
Robert


signature.asc
Description: This is a digitally signed message part


[VOTE] Release Apache Sling Feature Model Analyser 1.3.8

2020-09-03 Thread Robert Munteanu
Hi,

We solved 1 issue in this release:
https://issues.apache.org/jira/browse/SLING/fixforversion/12348716

Staging repository:
https://repository.apache.org/content/repositories/orgapachesling-2326/

You can use this UNIX script to download the release and verify the signatures:
https://gitbox.apache.org/repos/asf?p=sling-tooling-release.git;a=blob;f=check_staged_release.sh;hb=HEAD

Usage:
sh check_staged_release.sh 2326 /tmp/sling-staging

Please vote to approve this release:

  [ ] +1 Approve the release
  [ ]  0 Don't care
  [ ] -1 Don't release, because ...

This majority vote is open for at least 72 hours.

Regards,
Robert Munteanu


[jira] [Resolved] (SLING-9707) Variable ${sling.home} not replaced in configuration values

2020-09-03 Thread Robert Munteanu (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Munteanu resolved SLING-9707.

Resolution: Fixed

I've added the 'null' value workaround in [sling-org-apache-sling-starter 
commit 
e877f53|https://github.com/apache/sling-org-apache-sling-starter/commit/e877f53]
 , although I think it would be best to not need it.

[~cris_rockwell] - please rebase on top of the latest master, it should work as 
expected now.

> Variable ${sling.home} not replaced in configuration values
> ---
>
> Key: SLING-9707
> URL: https://issues.apache.org/jira/browse/SLING-9707
> Project: Sling
>  Issue Type: Bug
>  Components: Feature Model, Starter
>Affects Versions: Starter 12
>Reporter: Cris Rockwell
>Assignee: Robert Munteanu
>Priority: Major
> Fix For: Starter 12
>
>
> When configuring a file datastore, the variable ${sling.home} would be useful 
> as showed in the following feature.json and in the Starter Pull Request 
> ([https://github.com/apache/sling-org-apache-sling-starter/pull/13])
> {
>  "bundles":[
>  {
>  "id":"org.apache.jackrabbit:oak-segment-tar:${oak.version}",
>  "start-order":"15"
>  }
>  ],
>  "configurations":{
>  "org.apache.jackrabbit.oak.segment.SegmentNodeStoreService":
> { "name":"Default NodeStore", "customBlobStore":true }
> ,
>  "org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore": {
>  "minRecordLength":4096,
>  "path":"${sling.home}/repository/datastore",
>  "cacheSizeInMB":128
>  }
>  }
>  }
> Running java -jar dependency/org.apache.sling.feature.launcher.jar -f 
> slingfeature-tmp/feature-oak_tar.json -p sling
> Results in a folder called ${sling.home}
> {{➜ $ ls target}}
>  {{${sling.home} maven-archiver 
> org.apache.sling.starter-12-SNAPSHOT-oak_tar_far.far sling}}
>  {{classes maven-shared-archive-resources 
> org.apache.sling.starter-12-SNAPSHOT-sources.jar 
> sling-slingfeature-maven-plugin-fmtmp}}
>  {{dependency maven-status org.apache.sling.starter-12-SNAPSHOT.jar 
> slingfeature-tmp}}
>  {{generated-test-sources 
> org.apache.sling.starter-12-SNAPSHOT-oak_mongo_far.far rat.txt test-classes}}
>  
>  



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


[jira] [Updated] (SLING-9707) Variable ${sling.home} not replaced in configuration values

2020-09-03 Thread Robert Munteanu (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Munteanu updated SLING-9707:
---
Fix Version/s: Starter 12

> Variable ${sling.home} not replaced in configuration values
> ---
>
> Key: SLING-9707
> URL: https://issues.apache.org/jira/browse/SLING-9707
> Project: Sling
>  Issue Type: Bug
>  Components: Feature Model, Starter
>Affects Versions: Starter 12
>Reporter: Cris Rockwell
>Assignee: Robert Munteanu
>Priority: Major
> Fix For: Starter 12
>
>
> When configuring a file datastore, the variable ${sling.home} would be useful 
> as showed in the following feature.json and in the Starter Pull Request 
> ([https://github.com/apache/sling-org-apache-sling-starter/pull/13])
> {
>  "bundles":[
>  {
>  "id":"org.apache.jackrabbit:oak-segment-tar:${oak.version}",
>  "start-order":"15"
>  }
>  ],
>  "configurations":{
>  "org.apache.jackrabbit.oak.segment.SegmentNodeStoreService":
> { "name":"Default NodeStore", "customBlobStore":true }
> ,
>  "org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore": {
>  "minRecordLength":4096,
>  "path":"${sling.home}/repository/datastore",
>  "cacheSizeInMB":128
>  }
>  }
>  }
> Running java -jar dependency/org.apache.sling.feature.launcher.jar -f 
> slingfeature-tmp/feature-oak_tar.json -p sling
> Results in a folder called ${sling.home}
> {{➜ $ ls target}}
>  {{${sling.home} maven-archiver 
> org.apache.sling.starter-12-SNAPSHOT-oak_tar_far.far sling}}
>  {{classes maven-shared-archive-resources 
> org.apache.sling.starter-12-SNAPSHOT-sources.jar 
> sling-slingfeature-maven-plugin-fmtmp}}
>  {{dependency maven-status org.apache.sling.starter-12-SNAPSHOT.jar 
> slingfeature-tmp}}
>  {{generated-test-sources 
> org.apache.sling.starter-12-SNAPSHOT-oak_mongo_far.far rat.txt test-classes}}
>  
>  



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


[jira] [Assigned] (SLING-9707) Variable ${sling.home} not replaced in configuration values

2020-09-03 Thread Robert Munteanu (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Munteanu reassigned SLING-9707:
--

Assignee: Robert Munteanu

> Variable ${sling.home} not replaced in configuration values
> ---
>
> Key: SLING-9707
> URL: https://issues.apache.org/jira/browse/SLING-9707
> Project: Sling
>  Issue Type: Bug
>  Components: Feature Model, Starter
>Affects Versions: Starter 12
>Reporter: Cris Rockwell
>Assignee: Robert Munteanu
>Priority: Major
>
> When configuring a file datastore, the variable ${sling.home} would be useful 
> as showed in the following feature.json and in the Starter Pull Request 
> ([https://github.com/apache/sling-org-apache-sling-starter/pull/13])
> {
>  "bundles":[
>  {
>  "id":"org.apache.jackrabbit:oak-segment-tar:${oak.version}",
>  "start-order":"15"
>  }
>  ],
>  "configurations":{
>  "org.apache.jackrabbit.oak.segment.SegmentNodeStoreService":
> { "name":"Default NodeStore", "customBlobStore":true }
> ,
>  "org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore": {
>  "minRecordLength":4096,
>  "path":"${sling.home}/repository/datastore",
>  "cacheSizeInMB":128
>  }
>  }
>  }
> Running java -jar dependency/org.apache.sling.feature.launcher.jar -f 
> slingfeature-tmp/feature-oak_tar.json -p sling
> Results in a folder called ${sling.home}
> {{➜ $ ls target}}
>  {{${sling.home} maven-archiver 
> org.apache.sling.starter-12-SNAPSHOT-oak_tar_far.far sling}}
>  {{classes maven-shared-archive-resources 
> org.apache.sling.starter-12-SNAPSHOT-sources.jar 
> sling-slingfeature-maven-plugin-fmtmp}}
>  {{dependency maven-status org.apache.sling.starter-12-SNAPSHOT.jar 
> slingfeature-tmp}}
>  {{generated-test-sources 
> org.apache.sling.starter-12-SNAPSHOT-oak_mongo_far.far rat.txt test-classes}}
>  
>  



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