[jira] [Commented] (SLING-9857) Intermediate path is ignored if user/group already exists

2020-11-30 Thread Angela Schreiber (Jira)


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

Angela Schreiber commented on SLING-9857:
-

[~cziegeler], no, there is no API to move around a user. if you want to use 
user management API you have to remove and recreate it. if you prefer to move 
around the node, you can use the _getPath_ method and use that to call 
{{Session.move}}. Note however, that is would rely on an implementation 
detail the user management API contract does not mandate that there exists 
a JCR Node in the repository backing the user/group. The default implementation 
does but if that were ever to change moving the JCR node would no longer work.

here what the API states about the getPath method:
{code}
@throws UnsupportedRepositoryOperationException If this method is not
 * supported or if there exists no accessible item associated with this
 * Authorizable instance.
{code}

so, it depends a bit on how much you are willing to rely on {{getPath}} to be 
supported. I don't remember all the details but I suspect that some pieces of 
the repo-init implementation already make use of the {{getPath}} method.
hope that helps

> Intermediate path is ignored if user/group already exists
> -
>
> Key: SLING-9857
> URL: https://issues.apache.org/jira/browse/SLING-9857
> Project: Sling
>  Issue Type: Improvement
>  Components: Repoinit
>Reporter: Angela Schreiber
>Priority: Major
>
> Sling repoinit allows to create users/groups/service users with an optional 
> intermediate path (absolute or relative):
> {code}
> create service user my-feature-service with path system/my-feature
> create user my-feature-user with path /home/users/my-feature
> create group my-feature-group with path my-feature
> {code}
> however, in case the user/group/service user already exists the intermediate 
> path will be ignored.
> imo, there should be a way to make sure the intermediate path is respected 
> upon execution of {{CreateUser}}, {{CreateGroup}} and {{CreateServiceUser}} 
> operations.
> for example:
> h4. always verify and adjust path if needed
> in {{UserVisitor}}: if a group/user/service user already exists and the 
> create-operation includes a path (i.e. {{getPath()}} doesn't return 
> {{null}}), verify that {{Authorizable.getPath()}} is a descendant of that 
> path. If that's not the case move the corresponding node by either deleting 
> and recreating the user/group/service user or by actually moving.
> h4. global configuration option
> expand the repoinit such that handling of intermediate path can be configured 
> for all statements. for example add a configuration option to 
> {{JcrRepoInitOpsProcessorImpl}}. {{UserVisitor}} would only perform the 
> verification and potentially move, if the configuration option mandates it.
> the configuration could either be a simple boolean flag for this particular 
> case or be more sophisticated like e.g. 
> {{http://jackrabbit.apache.org/filevault/importmode.html}}.
> h4. expand repo-init statements
> if enforcing intermediate paths should not be dealt on a global level but on 
> a case by case basis, the create user/group/service user statements needed to 
> be expanded to allow for more fine-grained setup.  as with the previous 
> option it could be a simple flag or follow the example of 
> {{Jackrabbit-fvault}}, which defines a variety of import modes (see 
> http://jackrabbit.apache.org/filevault/importmode.html).
> h4. on a general note: 
> i see the benefit of the fine-grain import-modes (and ac-handling flags on 
> top of that, 
> http://jackrabbit.apache.org/filevault/apidocs/org/apache/jackrabbit/vault/fs/io/AccessControlHandling))
>  in jackrabbit-fvault. however, in a repository setup with many features, it 
> becomes increasingly difficult to manage and my personal preference would 
> rather be to keep it simple.
> note though SLING-6423: the fvault ac-handling flags already found their way 
> into the parser (implementation still missing though). so, maybe this issue 
> here in combination with SLING-6423 could be used to make a conscious 
> decision about the future development of repo-init beyond this improvement 
> and whether or not additional flexibility is desirable/needed.



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


[VOTE] Release Apache Sling App CMS version 1.0.0

2020-11-30 Thread Daniel Klco
Hi,

We solved 7 issues in this release:
https://issues.apache.org/jira/projects/SLING/versions/12348153

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

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 2383 /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.


[GitHub] [sling-org-apache-sling-junit-core] cmrockwell commented on a change in pull request #5: Sling 9915 support for sling annotations test runner

2020-11-30 Thread GitBox


cmrockwell commented on a change in pull request #5:
URL: 
https://github.com/apache/sling-org-apache-sling-junit-core/pull/5#discussion_r532946310



##
File path: 
src/main/java/org/apache/sling/junit/annotations/SlingAnnotationsTestRunner.java
##
@@ -56,4 +57,16 @@ protected Object createTest() throws Exception {
 return top.process(super.createTest());
 }
 }
+
+@Override
+public void run(RunNotifier notifier){
+try {
+super.run(notifier);
+} catch (Exception e) {
+log.error("Test 'run' method", e);
+} finally {
+AnnotationsProcessor ap = (AnnotationsProcessor) top;
+ap.closeAllServices();

Review comment:
   Thanks @jsedding for the detailed comment about un-getting services 
provided by @TestReference. I went with your first suggestion in this commit...
   
https://github.com/apache/sling-org-apache-sling-junit-core/pull/5/commits/e3f8233f52b1d96aedf61bf47c0898e74d00e86f
   
   Do you think it's necessary to change the TestObjectProcessor API for 
cleanupTest? Not sure what you think about this, but casting to 
AnnotationsProcessor avoided an API change. 





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




[GitHub] [sling-org-apache-sling-junit-core] sonarcloud[bot] removed a comment on pull request #5: Sling 9915 support for sling annotations test runner

2020-11-30 Thread GitBox


sonarcloud[bot] removed a comment on pull request #5:
URL: 
https://github.com/apache/sling-org-apache-sling-junit-core/pull/5#issuecomment-735974514


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=VULNERABILITY)
  
   [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-junit-core=5=false=SECURITY_HOTSPOT)
 [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-junit-core=5=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-junit-core=5=false=SECURITY_HOTSPOT)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=CODE_SMELL)
 [2 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-junit-core=5=new_coverage=list)
 [0.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-junit-core=5=new_coverage=list)
  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-junit-core=5=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-junit-core=5=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 
soon. 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




[GitHub] [sling-org-apache-sling-junit-core] sonarcloud[bot] commented on pull request #5: Sling 9915 support for sling annotations test runner

2020-11-30 Thread GitBox


sonarcloud[bot] commented on pull request #5:
URL: 
https://github.com/apache/sling-org-apache-sling-junit-core/pull/5#issuecomment-736092583


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=VULNERABILITY)
  
   [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-junit-core=5=false=SECURITY_HOTSPOT)
 [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-junit-core=5=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-junit-core=5=false=SECURITY_HOTSPOT)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=CODE_SMELL)
 [2 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-junit-core=5=new_coverage=list)
 [0.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-junit-core=5=new_coverage=list)
  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-junit-core=5=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-junit-core=5=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 
soon. 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] [Resolved] (SLING-9949) Speed-up bundled scripts resolution

2020-11-30 Thread Karl Pauls (Jira)


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

Karl Pauls resolved SLING-9949.
---
Resolution: Fixed

> Speed-up bundled scripts resolution
> ---
>
> Key: SLING-9949
> URL: https://issues.apache.org/jira/browse/SLING-9949
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Affects Versions: Servlets Resolver 2.7.10
>Reporter: Karl Pauls
>Assignee: Karl Pauls
>Priority: Major
> Fix For: Servlets Resolver 2.7.12
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> When resolving bundled scripts the resolver is currently parsing the metadata 
> several times. That can be avoided using caching the parsed result.
> Furthermore, the bundled script servlet is currently calculating the 
> providers on each request. That can be avoided by doing the calculation one 
> time when it is created. Additionally, it should unroll servlet exceptions 
> instead of wrapping them again in a servlet exception.
> Finally, the MergingResourceProvider does right now construct its resource 
> tree completely from scratch every time a servlet is added - that can be 
> avoided by just adding the servlet to the existing tree.



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


[jira] [Commented] (SLING-9421) Add Groovy Lang Support

2020-11-30 Thread Oliver Lietz (Jira)


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

Oliver Lietz commented on SLING-9421:
-

[~dklco], [~bdelacretaz], Now that all the Groovy bundles and dependencies are 
added to Starter only the Scripting Groovy bundle itself is missing for Groovy 
support in Sling Scripting. Should we add it also?

> Add Groovy Lang Support
> ---
>
> Key: SLING-9421
> URL: https://issues.apache.org/jira/browse/SLING-9421
> Project: Sling
>  Issue Type: Improvement
>  Components: App CMS, Launchpad
>Affects Versions: Starter 11, App CMS 0.16.2
>Reporter: Dan Klco
>Assignee: Dan Klco
>Priority: Minor
> Fix For: Starter 12, App CMS 0.16.4
>
>
> Composum Nodes supports executing [Groovy 
> scripts|https://www.composum.com/home/nodes/browser.html], however, this 
> requires Groovy to be available in the classpath. 
> We should add Groovy support to the Sling Starter and App CMS to enable users 
> to execute Groovy scripts without having to install any additional 
> dependencies. 



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


[jira] [Resolved] (SLING-9421) Add Groovy Lang Support

2020-11-30 Thread Dan Klco (Jira)


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

Dan Klco resolved SLING-9421.
-
Resolution: Fixed

Fixed in Starter: 
https://github.com/apache/sling-org-apache-sling-starter/commit/133c85260f5519ca0284bac120ff93fb852b88d1

> Add Groovy Lang Support
> ---
>
> Key: SLING-9421
> URL: https://issues.apache.org/jira/browse/SLING-9421
> Project: Sling
>  Issue Type: Improvement
>  Components: App CMS, Launchpad
>Affects Versions: Starter 11, App CMS 0.16.2
>Reporter: Dan Klco
>Assignee: Dan Klco
>Priority: Minor
> Fix For: Starter 12, App CMS 0.16.4
>
>
> Composum Nodes supports executing [Groovy 
> scripts|https://www.composum.com/home/nodes/browser.html], however, this 
> requires Groovy to be available in the classpath. 
> We should add Groovy support to the Sling Starter and App CMS to enable users 
> to execute Groovy scripts without having to install any additional 
> dependencies. 



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


[jira] [Updated] (SLING-9486) CMS - Not Compatible with AlpineJS

2020-11-30 Thread Dan Klco (Jira)


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

Dan Klco updated SLING-9486:

Fix Version/s: (was: App CMS 0.16.4)

> CMS - Not Compatible with AlpineJS
> --
>
> Key: SLING-9486
> URL: https://issues.apache.org/jira/browse/SLING-9486
> Project: Sling
>  Issue Type: Bug
>  Components: App CMS
>Affects Versions: App CMS 0.16.2
>Reporter: Dan Klco
>Assignee: Dan Klco
>Priority: Minor
>
> Seemingly due to the rewriter Sling CMS is not compatible with AlpineJS and 
> strips out the x-bind and @ attributes when rendering the HTML.



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


[jira] [Commented] (SLING-9421) Add Groovy Lang Support

2020-11-30 Thread Dan Klco (Jira)


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

Dan Klco commented on SLING-9421:
-

Fixed in Sling CMS: 
https://github.com/apache/sling-org-apache-sling-app-cms/commit/1b8c05050b5623a484876a4c0199c58e22debf9c

> Add Groovy Lang Support
> ---
>
> Key: SLING-9421
> URL: https://issues.apache.org/jira/browse/SLING-9421
> Project: Sling
>  Issue Type: Improvement
>  Components: App CMS, Launchpad
>Affects Versions: Starter 11, App CMS 0.16.2
>Reporter: Dan Klco
>Assignee: Dan Klco
>Priority: Minor
> Fix For: Starter 12, App CMS 0.16.4
>
>
> Composum Nodes supports executing [Groovy 
> scripts|https://www.composum.com/home/nodes/browser.html], however, this 
> requires Groovy to be available in the classpath. 
> We should add Groovy support to the Sling Starter and App CMS to enable users 
> to execute Groovy scripts without having to install any additional 
> dependencies. 



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


[GitHub] [sling-org-apache-sling-servlets-post] joerghoh commented on a change in pull request #6: SLING-9896 handle PersistenceExceptions explicitly and throw a 405

2020-11-30 Thread GitBox


joerghoh commented on a change in pull request #6:
URL: 
https://github.com/apache/sling-org-apache-sling-servlets-post/pull/6#discussion_r532852278



##
File path: 
src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java
##
@@ -234,6 +235,11 @@ protected void doPost(final SlingHttpServletRequest 
request,
 } catch (ResourceNotFoundException rnfe) {
 htmlResponse.setStatus(HttpServletResponse.SC_NOT_FOUND,
 rnfe.getMessage());
+} catch (final PersistenceException pe) {
+log.warn("PersistenceException while handling POST "
+  + request.getResource().getPath() + " with "
+  + operation.getClass().getName(), pe);
+
htmlResponse.setStatus(HttpServletResponse.SC_METHOD_NOT_ALLOWED,"invalid POST 
request");

Review comment:
   Regarding your request to make the exception handling in the Sling Post 
Servlet more specific: I don't plan to do that right now, because I don't have 
that requirement. And without an understanding what I want to achieve with it, 
the implementation will most likely be not that, what someone else might need 
(or not).
   





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




[GitHub] [sling-org-apache-sling-junit-core] sonarcloud[bot] commented on pull request #5: Sling 9915 support for sling annotations test runner

2020-11-30 Thread GitBox


sonarcloud[bot] commented on pull request #5:
URL: 
https://github.com/apache/sling-org-apache-sling-junit-core/pull/5#issuecomment-735974514


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=VULNERABILITY)
  
   [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-junit-core=5=false=SECURITY_HOTSPOT)
 [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-junit-core=5=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-junit-core=5=false=SECURITY_HOTSPOT)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=CODE_SMELL)
 [2 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-junit-core=5=new_coverage=list)
 [0.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-junit-core=5=new_coverage=list)
  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-junit-core=5=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-junit-core=5=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 
soon. 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




[GitHub] [sling-org-apache-sling-junit-core] sonarcloud[bot] removed a comment on pull request #5: Sling 9915 support for sling annotations test runner

2020-11-30 Thread GitBox


sonarcloud[bot] removed a comment on pull request #5:
URL: 
https://github.com/apache/sling-org-apache-sling-junit-core/pull/5#issuecomment-732479510


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=SECURITY_HO
 TSPOT) [0 Security 
Hotspots](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=CODE_SMELL)
 [2 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-junit-core=5=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-junit-core=5=new_coverage=list)
 [0.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-junit-core=5=new_coverage=list)
  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-junit-core=5=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-junit-core=5=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 
soon. 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] [Created] (SLING-9951) Add option to JCR and File Installer to override multi-version support per bundle

2020-11-30 Thread Konrad Windszus (Jira)
Konrad Windszus created SLING-9951:
--

 Summary: Add option to JCR and File Installer to override 
multi-version support per bundle
 Key: SLING-9951
 URL: https://issues.apache.org/jira/browse/SLING-9951
 Project: Sling
  Issue Type: Improvement
Affects Versions: JCR Installer 3.3.0, File Installer 1.3.0
Reporter: Konrad Windszus


When the option introduced with SLING-9172 is active, the Sling Installer will 
always install other bundle versions in addition, instead of updating the 
already deployed version. It should be possible to override this behaviour per 
bundle provided to the OSGi installer.

This could e.g. be expressed with a certain name file name/node pattern, e.g. 
.update.. Both the JCR Installer and the File Installer should 
support it.



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


[GitHub] [sling-org-apache-sling-servlets-post] enapps-enorman commented on a change in pull request #6: SLING-9896 handle PersistenceExceptions explicitly and throw a 405

2020-11-30 Thread GitBox


enapps-enorman commented on a change in pull request #6:
URL: 
https://github.com/apache/sling-org-apache-sling-servlets-post/pull/6#discussion_r532800204



##
File path: 
src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java
##
@@ -234,6 +235,11 @@ protected void doPost(final SlingHttpServletRequest 
request,
 } catch (ResourceNotFoundException rnfe) {
 htmlResponse.setStatus(HttpServletResponse.SC_NOT_FOUND,
 rnfe.getMessage());
+} catch (final PersistenceException pe) {
+log.warn("PersistenceException while handling POST "
+  + request.getResource().getPath() + " with "
+  + operation.getClass().getName(), pe);
+
htmlResponse.setStatus(HttpServletResponse.SC_METHOD_NOT_ALLOWED,"invalid POST 
request");

Review comment:
   > There are many different types of errors (not having write permissions 
on content is one of them), and the various types of operations do not clearly 
distinguish between them, but always a PersistenceException. Also in quite some 
cases the JCR API is not really granular and just throws RepositoryExceptions 
if something is not working as expected.
   > 
   
   Maybe this would be a good time to do the extra work to identify those 
places and throw more specific exceptions?





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-9915) Remove deprecated flags for SlingAnnotationsTestRunner and TestReference

2020-11-30 Thread Cris Rockwell (Jira)


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

Cris Rockwell commented on SLING-9915:
--

Thanks [~bdelacretaz] for the tips. After reviewing the maven-failsafe-plugin 
instructions (1) debugging access to the test worked. Debugging the actual test 
Sling instance also worked with a separate debugger configured in 
{{pax.vm.options}} as suggested in the pom properties, and while running both 
debuggers. It may be useful to add a few comments in the project about these 
debugging procedures.


{code:java}

-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5015

{code}
 
 
 
Thank you for fixing the tests with your commit  
[https://github.com/apache/sling-org-apache-sling-junit-core/commit/4aa41bcb60c64eb0de795e54774e8f45c7e4f1aa
 
|https://github.com/apache/sling-org-apache-sling-junit-core/commit/4aa41bcb60c64eb0de795e54774e8f45c7e4f1aa.]I've
 reviewed the changes. Seems two fixes were needed: * Properly installing the 
org.apache.sling.junit.core bundle (and not embedding it)

{code:java}
mavenBundle().groupId("org.apache.sling").artifactId("org.apache.sling.junit.core").versionAsInProject(){code}
 * Properly satisfying the {{osgi.contract=JavaJSONP}} the capability (not 
setting Provide-Capability in the annotation-it testing bundle) 

{code:java}
SlingOptions.versionResolver.setVersion("org.apache.sling", 
"org.apache.sling.commons.johnzon", "1.2.6");
{code}
 
 
(1) 
[https://maven.apache.org/surefire/maven-failsafe-plugin/examples/debugging.html]

> Remove deprecated flags for SlingAnnotationsTestRunner and TestReference
> 
>
> Key: SLING-9915
> URL: https://issues.apache.org/jira/browse/SLING-9915
> Project: Sling
>  Issue Type: Task
>  Components: JUnit Core
>Affects Versions: JUnit Core 1.1.0
>Reporter: Cris Rockwell
>Assignee: Cris Rockwell
>Priority: Minor
>  Labels: test, tools
>
> As per discussion thread
> https://www.mail-archive.com/dev@sling.apache.org/msg100097.html
> Revert this commit
> https://github.com/apache/sling-org-apache-sling-junit-core/commit/c7f98b1172126f1e5f961ec9d17d12b239c34e0d
> Reviving annotations
> @TestReference
> @SlingAnnotationsTestRunner 
> Review docs and suggest updates 
> https://sling.apache.org/documentation/development/sling-testing-tools.html
> https://sling.apache.org/documentation/bundles/org-apache-sling-junit-bundles.html



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


[GitHub] [sling-org-apache-sling-servlets-post] joerghoh commented on a change in pull request #6: SLING-9896 handle PersistenceExceptions explicitly and throw a 405

2020-11-30 Thread GitBox


joerghoh commented on a change in pull request #6:
URL: 
https://github.com/apache/sling-org-apache-sling-servlets-post/pull/6#discussion_r532736021



##
File path: 
src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java
##
@@ -234,6 +235,11 @@ protected void doPost(final SlingHttpServletRequest 
request,
 } catch (ResourceNotFoundException rnfe) {
 htmlResponse.setStatus(HttpServletResponse.SC_NOT_FOUND,
 rnfe.getMessage());
+} catch (final PersistenceException pe) {
+log.warn("PersistenceException while handling POST "
+  + request.getResource().getPath() + " with "
+  + operation.getClass().getName(), pe);
+
htmlResponse.setStatus(HttpServletResponse.SC_METHOD_NOT_ALLOWED,"invalid POST 
request");

Review comment:
   There are many different types of errors (not having write permissions 
on content is one of them), and the various types of operations do not clearly 
distinguish between them, but always a PersistenceException. Also in quite some 
cases the JCR API is not really granular and just throws RepositoryExceptions 
if something is not working as expected. 
   
   So I tried to be generic and create a kind of universal "client side error". 
If someone needs a more granular handling and support more types of client 
errors. 
   
   What do you mean with
   
   > Do you think we could add tests mocking real world issue
   
   Do you see real world issues which would require a different handling?
   





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] [Closed] (SLING-9924) Feature Model Converter Maven Plugin does not consult remote repositories to resolve artifacts

2020-11-30 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert closed SLING-9924.
-

> Feature Model Converter Maven Plugin does not consult remote repositories to 
> resolve artifacts
> --
>
> Key: SLING-9924
> URL: https://issues.apache.org/jira/browse/SLING-9924
> Project: Sling
>  Issue Type: Bug
>  Components: Maven Plugins and Archetypes
>Affects Versions: Feature Model Converter Plugin 1.0.8
>Reporter: A. J. David Bosschaert
>Assignee: A. J. David Bosschaert
>Priority: Major
> Fix For: Feature Model Converter Plugin 1.0.10
>
>
> When resolving artifacts the sling-feature-converter-maven-plugin does not 
> consult remote repositories.



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


[jira] [Closed] (SLING-9933) Make it possible to plug into the ArtifactProvider used in the AnalyserMojo

2020-11-30 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert closed SLING-9933.
-

> Make it possible to plug into the ArtifactProvider used in the AnalyserMojo
> ---
>
> Key: SLING-9933
> URL: https://issues.apache.org/jira/browse/SLING-9933
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Affects Versions: slingfeature-maven-plugin 1.4.16
>Reporter: A. J. David Bosschaert
>Assignee: A. J. David Bosschaert
>Priority: Major
> Fix For: slingfeature-maven-plugin 1.4.18
>
>




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


[jira] [Closed] (SLING-9936) Converter should fail with reference based repoinit configurations

2020-11-30 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert closed SLING-9936.
-

> Converter should fail with reference based repoinit configurations
> --
>
> Key: SLING-9936
> URL: https://issues.apache.org/jira/browse/SLING-9936
> Project: Sling
>  Issue Type: Improvement
>  Components: Content-Package to Feature Model Converter
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Content-Package to Feature Model Converter 1.0.22
>
>
> The converter is currently handling the factory configurations for repoinit 
> if they have scripts properties set.
> It should fail if the  singleton configuration with PID 
> org.apache.sling.jcr.repoinit.impl.RepositoryInitializer is used
> It should also fail, if the factory configuration is using references



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


[jira] [Closed] (SLING-9867) Add extension to provide metadata about configuration api

2020-11-30 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert closed SLING-9867.
-

> Add extension to provide metadata about configuration api
> -
>
> Key: SLING-9867
> URL: https://issues.apache.org/jira/browse/SLING-9867
> Project: Sling
>  Issue Type: Improvement
>  Components: Feature Model
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Feature Model API Regions Extension 1.1.14
>
>
> OSGi configurations create an API surfarce, however there is currently no way 
> to properly describe this - while there is the metatype specification, usage 
> of it is optional and also does not provide all relevant options like 
> deprecating properties or configurations, or adding validation rules.



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


[jira] [Closed] (SLING-9937) api-regions-crossfeature-dups should work if all exports come from API Regions

2020-11-30 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert closed SLING-9937.
-

> api-regions-crossfeature-dups should work if all exports come from API Regions
> --
>
> Key: SLING-9937
> URL: https://issues.apache.org/jira/browse/SLING-9937
> Project: Sling
>  Issue Type: Improvement
>  Components: Feature Model Analyser
>Affects Versions: Feature Model API Regions Extension 1.1.12
>Reporter: A. J. David Bosschaert
>Assignee: A. J. David Bosschaert
>Priority: Major
> Fix For: Feature Model API Regions Extension 1.1.14
>
>
> The {{api-regions-crossfeature-dups}} analyser currently only works if 
> exports are contributed from a feature that does not opt into the API 
> Regions. 
> However it should also work for features that _do_ opt into the API Regions. 
> For such cases a 'defining' feature set should be specified. If any bundle 
> exports a package into an API Region that is also exported by a bundle that's 
> part of the defining region, this should trigger a error (or warning).



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


[jira] [Closed] (SLING-9927) Allow java.* imports to be defined, in line with OSGi R7

2020-11-30 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert closed SLING-9927.
-

> Allow java.* imports to be defined, in line with OSGi R7
> 
>
> Key: SLING-9927
> URL: https://issues.apache.org/jira/browse/SLING-9927
> Project: Sling
>  Issue Type: Bug
>  Components: Feature Model Analyser
>Affects Versions: Feature Model Analyser 1.3.12
>Reporter: Radu Cotescu
>Assignee: A. J. David Bosschaert
>Priority: Major
> Fix For: Feature Model Analyser 1.3.14
>
>
> The default Sling analysers seem to not allow {{java.*}} imports:
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.sling:slingfeature-maven-plugin:1.4.16:analyse-features (analyze) 
> on project : Exception during analysing feature  : 
> org.osgi.framework.BundleException: Unable to build resource for null: 
> Importing java.* packages not allowed: java.awt -> [Help 1] {noformat}



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


[jira] [Closed] (SLING-9943) Make Report methods public

2020-11-30 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert closed SLING-9943.
-

> Make Report methods public
> --
>
> Key: SLING-9943
> URL: https://issues.apache.org/jira/browse/SLING-9943
> Project: Sling
>  Issue Type: Bug
>  Components: Feature Model Analyser
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Feature Model Analyser 1.3.14
>
>
> The getKey() and getValue() method in the AnalyseResult.Result class are not 
> public and therefore not accessible for code calling the analyser (outside of 
> this package)



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


[jira] [Closed] (SLING-9947) Update Feature Model Launcher to latest feature model

2020-11-30 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert closed SLING-9947.
-

> Update Feature Model Launcher to latest feature model
> -
>
> Key: SLING-9947
> URL: https://issues.apache.org/jira/browse/SLING-9947
> Project: Sling
>  Issue Type: Improvement
>  Components: Feature Model
>Affects Versions: Feature Model Launcher 1.1.12
>Reporter: A. J. David Bosschaert
>Assignee: A. J. David Bosschaert
>Priority: Major
> Fix For: Feature Model Launcher 1.1.14
>
>
> The feature model launcher should use feature model 1.2.16. Because it embeds 
> it, a new release of the launcher must be made.



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


[jira] [Closed] (SLING-9917) Allow to store metadata alongside framework properties and variables

2020-11-30 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert closed SLING-9917.
-

> Allow to store metadata alongside framework properties and variables
> 
>
> Key: SLING-9917
> URL: https://issues.apache.org/jira/browse/SLING-9917
> Project: Sling
>  Issue Type: Improvement
>  Components: Feature Model
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Feature Model 1.2.16
>
>
> While artifacts and configurations allow to store additional metadata, 
> framework properties and variables do not allow this.
> This is especially useful to keep track of the origins of a 
> variable/framework property (in which feature they have been added/updated)



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


[jira] [Closed] (SLING-9920) Simplify BuilderUtil.mergeWithContextOverride

2020-11-30 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert closed SLING-9920.
-

> Simplify BuilderUtil.mergeWithContextOverride
> -
>
> Key: SLING-9920
> URL: https://issues.apache.org/jira/browse/SLING-9920
> Project: Sling
>  Issue Type: Improvement
>  Components: Feature Model
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Feature Model 1.2.16
>
>
> One argument for mergeWithContextOverride is an entry set which is used as an 
> iterator inside the method - this comes with the downside that searching and 
> getting a value requires to re-iterate over the iterator over and over again.
> The code can be simplified by just passing in the context map



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


[jira] [Closed] (SLING-9918) Keep origins for framework properties and variables

2020-11-30 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert closed SLING-9918.
-

> Keep origins for framework properties and variables
> ---
>
> Key: SLING-9918
> URL: https://issues.apache.org/jira/browse/SLING-9918
> Project: Sling
>  Issue Type: Improvement
>  Components: Feature Model
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Feature Model 1.2.16
>
>
> With SLING-9917 we can keep metadata for framework properties and variables. 
> This metadata can be used to store the origins of framework properties and 
> variables similar to what we already do for configurations and artifacts.



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


[RESULT][VOTE] Release Apache Sling Feature Model 1.2.16, Feature Model Analyser 1.3.14, Feature Model Launcher 1.1.14, Feature Model API Regions Extension 1.1.14, Content-Package to Feature Model Con

2020-11-30 Thread davidb
With binding +1 votes from Karl Pauls, Carsten Ziegeler and me this release
is successful. I've promoted the artifacts.

Best regards,

David

On Fri, 27 Nov 2020 at 15:34,  wrote:

> Hi all,
>
> I would like to call the release on the following Apache Sling Feature
> Model related components:
>
> Feature Model 1.2.16
> https://issues.apache.org/jira/projects/SLING/versions/12349385
>
> Feature Model Analyser 1.3.14
> https://issues.apache.org/jira/projects/SLING/versions/12349386
>
> Feature Model Launcher 1.1.14
> https://issues.apache.org/jira/projects/SLING/versions/12349396
>
> Feature Model API Regions Extension 1.1.14
> https://issues.apache.org/jira/projects/SLING/versions/12349384
>
> Content-Package to Feature Model Converter 1.0.22
> https://issues.apache.org/jira/projects/SLING/versions/12349402
>
> slingfeature-maven-plugin 1.4.18
> https://issues.apache.org/jira/projects/SLING/versions/12349399
>
> Feature Model Converter Plugin 1.0.10
> https://issues.apache.org/jira/projects/SLING/versions/12349389
>
> Staging repository:
> https://repository.apache.org/content/repositories/orgapachesling-2382
>
> 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 2382 /tmp/sling-staging
>
> Please vote to approve this release:
>
>[ ] +1 Approve the release
>[ ] -1 Don't release, because ...
>
> This majority vote is open for at least 72 hours.
>
> Best regards,
>
> David
>


[jira] [Updated] (SLING-8942) Support aggregate and abstract privileges

2020-11-30 Thread Karl Pauls (Jira)


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

Karl Pauls updated SLING-8942:
--
Fix Version/s: Content-Package to Feature Model Converter 1.0.24

> Support aggregate and abstract privileges
> -
>
> Key: SLING-8942
> URL: https://issues.apache.org/jira/browse/SLING-8942
> Project: Sling
>  Issue Type: Improvement
>  Components: Content-Package to Feature Model Converter
>Affects Versions: Content-Package to Feature Model Converter 1.0.2
>Reporter: Konrad Windszus
>Priority: Major
> Fix For: Content-Package to Feature Model Converter 1.0.24
>
>
> Currently only simple privileges are supported via 
> https://github.com/apache/sling-org-apache-sling-feature-cpconverter/blob/ffc6bb990dfaf82c477a28ad4b87b0c12859b743/src/main/java/org/apache/sling/feature/cpconverter/handlers/PrivilegesHandler.java#L65.
>  Aggregate and abstract privileges should be supported as well.



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


Re: jenkins configuration rights

2020-11-30 Thread Nicolas Peltier
thanks Bertrand, just did

Le lun. 30 nov. 2020 à 15:04, Bertrand Delacretaz 
a écrit :

> Hi,
>
> On Mon, Nov 30, 2020 at 2:40 PM Nicolas Peltier
>  wrote:
> > ...should i add something in
> >
> https://sling.apache.org/documentation/development.html#sling-development-1
> > ?
>
> Looks like we already have Jenkins information at
> https://sling.apache.org/project-information.html#continuous-integration
>
> I think what would be useful is
>
> 1) Point to
> https://cwiki.apache.org/confluence/display/SLING/Sling+module+descriptor
> from that project-information.html#continuous-integration section
>
> 2) Point to that #continuous-integration page from
> development.html#sling-development-1
>
> Feel free to go ahead if you agree with that!
>
> -Bertrand
>


[GitHub] [sling-org-apache-sling-feature-cpconverter] karlpauls opened a new pull request #35: Issues/sling 9926

2020-11-30 Thread GitBox


karlpauls opened a new pull request #35:
URL: 
https://github.com/apache/sling-org-apache-sling-feature-cpconverter/pull/35


   



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] [Assigned] (SLING-9926) Wrong PID if configuration is in a nested folder

2020-11-30 Thread Karl Pauls (Jira)


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

Karl Pauls reassigned SLING-9926:
-

Assignee: Karl Pauls

> Wrong PID if configuration is in a nested folder
> 
>
> Key: SLING-9926
> URL: https://issues.apache.org/jira/browse/SLING-9926
> Project: Sling
>  Issue Type: Bug
>  Components: Content-Package to Feature Model Converter
>Affects Versions: Content-Package to Feature Model Converter 1.0.18
>Reporter: Carsten Ziegeler
>Assignee: Karl Pauls
>Priority: Major
> Fix For: Content-Package to Feature Model Converter 1.0.24
>
>
> If a configuration is contained in a subfolder like 
> /apps/config/foo/myconfig.xml the resulting PID is currently foo/myconfig 
> instead of just myconfig
> This is probably due to how the PID is derived from the patch using the regex



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


Re: jenkins configuration rights

2020-11-30 Thread Bertrand Delacretaz
Hi,

On Mon, Nov 30, 2020 at 2:40 PM Nicolas Peltier
 wrote:
> ...should i add something in
> https://sling.apache.org/documentation/development.html#sling-development-1
> ?

Looks like we already have Jenkins information at
https://sling.apache.org/project-information.html#continuous-integration

I think what would be useful is

1) Point to 
https://cwiki.apache.org/confluence/display/SLING/Sling+module+descriptor
from that project-information.html#continuous-integration section

2) Point to that #continuous-integration page from
development.html#sling-development-1

Feel free to go ahead if you agree with that!

-Bertrand


[jira] [Resolved] (SLING-8912) Integrate Sling Content Distribution into Sling App CMS

2020-11-30 Thread Dan Klco (Jira)


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

Dan Klco resolved SLING-8912.
-
Resolution: Fixed

> Integrate Sling Content Distribution into Sling App CMS
> ---
>
> Key: SLING-8912
> URL: https://issues.apache.org/jira/browse/SLING-8912
> Project: Sling
>  Issue Type: Improvement
>  Components: App CMS
>Reporter: Dan Klco
>Priority: Major
>  Labels: backlog
> Fix For: App CMS 0.16.4
>
>
> Enable horizontal scaling with read-only instances of Sling CMS by 
> integrating Sling Content Distribution in the push pattern: 
> [https://sling.apache.org/documentation/bundles/distribution.html]



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


[jira] [Resolved] (SLING-8913) Create Multiple Sling CMS Instance Types

2020-11-30 Thread Dan Klco (Jira)


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

Dan Klco resolved SLING-8913.
-
Resolution: Fixed

> Create Multiple Sling CMS Instance Types
> 
>
> Key: SLING-8913
> URL: https://issues.apache.org/jira/browse/SLING-8913
> Project: Sling
>  Issue Type: Improvement
>  Components: App CMS
>Reporter: Dan Klco
>Assignee: Dan Klco
>Priority: Major
>  Labels: backlog
> Fix For: App CMS 0.16.4
>
>
> Currently, there is only a single build of Sling CMS which is easier, but the 
> build also contains dependencies and code which would not be required in a 
> read-only instance. The idea here would be to:
>  * separate out the authoring-specific features from the base CMS features
>  * remove all non-required dependencies (e.g. Tika Bundle, etc)
>  * potentially tweak the configuration for security
>  * create an instance type for standalone vs. author
>  * implement builders for each type of instance
> The goal is to build a smaller distribution specifically for creating 
> read-only instances and then distributions for standalone and author 
> instances.



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


[jira] [Resolved] (SLING-9941) Accessing sling CMS resources in external application through API

2020-11-30 Thread Dan Klco (Jira)


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

Dan Klco resolved SLING-9941.
-
Resolution: Fixed

> Accessing sling CMS resources in external application through API
> -
>
> Key: SLING-9941
> URL: https://issues.apache.org/jira/browse/SLING-9941
> Project: Sling
>  Issue Type: Improvement
>Reporter: Preetham Ponnappa
>Priority: Major
>
> I have a simple web app built with Sling CMS, having some react components. I 
> want to know how Sling Contents can be retrieved using Sling API . Looking 
> for some sample implementations



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


[jira] [Commented] (SLING-9941) Accessing sling CMS resources in external application through API

2020-11-30 Thread Dan Klco (Jira)


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

Dan Klco commented on SLING-9941:
-

Natively, Sling exposes all resources via JSON using the .json extension: 
https://www.danklco.com/posts/2020/11/case-insensitive-queries-aem-query-builder.json
 you can also retrieve multiple levels using numeric or the infinity selector, 
e.g. /mypage.infinity.json (note I've blocked this on my personal site)

If you want more control over the exported values you can use the Sling Models 
exporter:
https://sling.apache.org/documentation/bundles/models.html#exporter-framework-since-130-1
https://blogs.perficient.com/2018/07/26/no-servlets-required-exporting-data-with-sling-models/

Finally, it's not bundled in Sling CMS, but you can install the Sling GraphQL 
Core bundle to query and load content via GraphQL:
https://sling.apache.org/documentation/bundles/graphql-core.html

Please re-open if you have any further questions.

> Accessing sling CMS resources in external application through API
> -
>
> Key: SLING-9941
> URL: https://issues.apache.org/jira/browse/SLING-9941
> Project: Sling
>  Issue Type: Improvement
>Reporter: Preetham Ponnappa
>Priority: Major
>
> I have a simple web app built with Sling CMS, having some react components. I 
> want to know how Sling Contents can be retrieved using Sling API . Looking 
> for some sample implementations



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


Re: jenkins configuration rights

2020-11-30 Thread Nicolas Peltier
That did the trick, thanks Bertrand! should i add something in
https://sling.apache.org/documentation/development.html#sling-development-1
?
like a link to that wiki you sent me, in a bullet point, text "Configuring
a module Jenkins build wiki"?

Le lun. 30 nov. 2020 à 14:14, Bertrand Delacretaz 
a écrit :

> Hi Nicolas,
>
> On Mon, Nov 30, 2020 at 1:58 PM Nicolas Peltier
>  wrote:
> > ...i'd like to switch pipes build to java 11, but i don't seem to have
> jenkins
> > right to modify that build (i guess this is there i would do it)...
>
> AFAIK you only need to change your module's .sling-module.json file,
> like
> https://github.com/apache/sling-whiteboard/blob/master/.sling-module.json
>
> Docs at
> https://cwiki.apache.org/confluence/display/SLING/Sling+module+descriptor
>
> -Bertrand
>


[jira] [Created] (SLING-9950) Sling Type System and Remote Content API

2020-11-30 Thread Bertrand Delacretaz (Jira)
Bertrand Delacretaz created SLING-9950:
--

 Summary: Sling Type System and Remote Content API
 Key: SLING-9950
 URL: https://issues.apache.org/jira/browse/SLING-9950
 Project: Sling
  Issue Type: Improvement
  Components: Engine
Reporter: Bertrand Delacretaz
Assignee: Bertrand Delacretaz


This ticket keeps track of the 
[https://github.com/apache/sling-whiteboard/tree/master/remote-content-api] 
prototype that aims to implement the ideas at 
[https://cwiki.apache.org/confluence/display/SLING/Sling+Type+System%3A+motivation+and+requirements]
 and use that to create an hypertext-driven and document-oriented Remote 
Content API for Sling.

I'm assigning this to myself to coordinate the work, but collaborations are 
welcome of course.



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


Re: Dynamic Class Loader Manager causes lots of service restarts

2020-11-30 Thread Wim Symons
Hi Julian,

Thanks for the extra information.

Have you looked at Georg’s proposal? 
https://www.mail-archive.com/dev@sling.apache.org/msg88782.html
As he suggests, it might be mitigated/improved by splitting into multiple DCLM.
I believe this would look more like as it was before (on AEM 6.4.4.0 for 
example).

But making such a change would be out of my league as well.

And for the record, we already have Jörg’s improvement in place .

Kind regards

Wim


Van: Julian Sedding 
Datum: maandag, 30 november 2020 om 11:59
Aan: Sling Developers List 
Onderwerp: Re: Dynamic Class Loader Manager causes lots of service restarts
Hi Wim

I looked into this issue back then and concluded that it may not be
feasible at all to (significantly) improve the restart-performance of
the DCLM. The reason is that it is very hard or impossible to
correctly replace class-loaders due to JVM internal caching (I forgot
the details, it's been a while). If resolving this is at all possible,
it would IMHO require a lot of time.

However, I had success improving performance of deployments on AEM 6.5
by following an (unrelated) suggestion by Jörg Hoh:
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcqdump.wordpress.com%2F2020%2F07%2F13%2Fslow-deployments-on-aem-6-4-6-5%2Fdata=04%7C01%7CWim.SYMONS%40vrt.be%7C808095b380414db5891d08d8951f12e0%7Cae2e7156c854434a94adbb5e5db6a5ea%7C0%7C0%7C637423307984268859%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=Enzjg30y6SZNbox50jhzguc7UXJFI8RPEzYbdwUPdNM%3Dreserved=0

The only other thing I know can help is keeping models in a separate
bundle from your other code. If no other bundles improt code from your
model-bundle, their restart is cheaper.

Regards
Julian

On Fri, Nov 27, 2020 at 9:50 AM Wim Symons  wrote:
>
> Hi all,
>
> We upgraded from AEM 6.4 to AEM 6.5 last week and unfortunately we learned 
> about DLCM.
>
> Before AEM 6.5 we had absolutely no trouble to keep the AEM author online 
> while deploying and had no JSP/HTL errors during deploys.
> As of AEM 6.5 that changed for the worse.
>
> Because of all the Sling models we use, every we time we deploy any of our 
> applications, DLCM gets unregistered/registered,
> causing also the JSP/HTL compilation to fail.
>
> This results in the author UI responding with HTTP 404 messages until DLCM is 
> registered and active again.
>
> In the log files, this looks like:
>
> 20.11.2020 14:31:18.385 *DEBUG* [OsgiInstallerImpl] 
> org.apache.sling.commons.classloader.impl.Activator Dynamic Class Loader is 
> reloaded because it has previously loaded classes from bundle '[blanked-out]' 
> which is no longer active
> ...
> 20.11.2020 14:31:18.928 *INFO* [OsgiInstallerImpl] 
> org.apache.sling.scripting.sightly Service 
> [org.apache.sling.scripting.sightly.impl.engine.compiled.SlingHTLMasterCompiler,41500,
>  
> [org.apache.sling.scripting.sightly.impl.engine.compiled.SlingHTLMasterCompiler]]
>  ServiceEvent UNREGISTERING
>
> As of that point, navigating around in the UI results in browser errors like:
>
> Missing Compilation Support.
>
> Cannot serve request to /sites.html/content/[blanked-out] in 
> /libs/granite/ui/components/shell/header/user/user.html
>
> Exception:
>
> javax.script.ScriptException: Missing compilation support.
>   at 
> org.apache.sling.scripting.sightly.impl.engine.SightlyScriptEngine.compile(SightlyScriptEngine.java:60)
>   ...
>
> A while (10-60 seconds, depending on the application being deployed) later, 
> the logs look like:
>
> 20.11.2020 14:31:32.219 *INFO* [OsgiInstallerImpl] 
> org.apache.sling.scripting.sightly Service 
> [org.apache.sling.scripting.sightly.impl.engine.compiled.SlingHTLMasterCompiler,44334,
>  
> [org.apache.sling.scripting.sightly.impl.engine.compiled.SlingHTLMasterCompiler]]
>  ServiceEvent REGISTERED
> 20.11.2020 14:31:32.232 *INFO* [OsgiInstallerImpl] 
> org.apache.sling.scripting.sightly.impl.engine.compiled.SlingHTLMasterCompiler
>  Activating 
> org.apache.sling.scripting.sightly.impl.engine.compiled.SlingHTLMasterCompiler
>
> And after that, all is fine again.
>
> As this post is already a year old, I’m wondering if there was any progress 
> in this area?
>
> I also noticed a (significant?) difference in the 
> org.apache.sling.scripting.sightly.impl.engine.compiled.SlingHTLMasterCompiler
>  class.
> There the DLCM is referenced with the greedy option, while in 
> org.apache.sling.scripting.sightly.models.impl.SlingModelsUseProvider and 
> org.apache.sling.scripting.jsp.JspScriptEngineFactory this is referenced with 
> the reluctant option.
> Can anyone explain why this is the case?
>
> I can only hope this gets fixed/improved in Apache Sling soon and see it 
> appear in an upcoming AEM 6.5 Service Pack.
>
> Kind regards and hope to hear something soon,
>
> Wim Symons
>
> P.S. I hope this gets attached to the correct thread.
>
>
> On 2019/10/25 09:07:42, Julian Sedding  wrote:
> > @Konrad: I agree 

Re: jenkins configuration rights

2020-11-30 Thread Bertrand Delacretaz
Hi Nicolas,

On Mon, Nov 30, 2020 at 1:58 PM Nicolas Peltier
 wrote:
> ...i'd like to switch pipes build to java 11, but i don't seem to have jenkins
> right to modify that build (i guess this is there i would do it)...

AFAIK you only need to change your module's .sling-module.json file,
like https://github.com/apache/sling-whiteboard/blob/master/.sling-module.json

Docs at 
https://cwiki.apache.org/confluence/display/SLING/Sling+module+descriptor

-Bertrand


[jira] [Commented] (SLING-9862) Support installing repoinit files listed in bundle header

2020-11-30 Thread Oliver Lietz (Jira)


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

Oliver Lietz commented on SLING-9862:
-

For Sling on Karaf I have switched to [external repoinit 
statements|https://github.com/apache/sling-org-apache-sling-karaf-configs/commit/a0d41eb84d4d32f88dcf2edfcdbbebf67055030a]
 *again* in preparation of using the OSGi R7 JSON configuration format 
(leveraging the classpath protocol handler and not the OSGi Configurator, see 
SLING-9944).

> Support installing repoinit files listed in bundle header
> -
>
> Key: SLING-9862
> URL: https://issues.apache.org/jira/browse/SLING-9862
> Project: Sling
>  Issue Type: New Feature
>  Components: Repoinit
>Affects Versions: Repoinit JCR 1.1.26
>Reporter: Julian Sedding
>Assignee: Julian Sedding
>Priority: Minor
>
> Implement support for a {{Sling-RepoInit}} bundle header that consists of a 
> comma separated list of relative paths pointing to resources within the 
> bundle. For each bundle with a non-empty {{Sling-RepoInit}} header, a 
> {{SlingRepositoryInitializer}} that applies all repoinit files referenced in 
> the header, should be dynamically registered.
> Such a mechanism would allow bundles to install their own service-user and 
> corresponding ACLs.



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


[jira] [Commented] (SLING-9944) Bundle configurations and reference via classpath protocol

2020-11-30 Thread Oliver Lietz (Jira)


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

Oliver Lietz commented on SLING-9944:
-

Done in 
[62f9da9|https://github.com/apache/sling-org-apache-sling-karaf-configs/commit/62f9da92b19d2f5604be9b642523e85fea572b1d]
 and 
[a0d41eb|https://github.com/apache/sling-org-apache-sling-karaf-configs/commit/a0d41eb84d4d32f88dcf2edfcdbbebf67055030a].
 Keeping _in progress_ until KARAF-6904 is done.

> Bundle configurations and reference via classpath protocol
> --
>
> Key: SLING-9944
> URL: https://issues.apache.org/jira/browse/SLING-9944
> Project: Sling
>  Issue Type: Improvement
>  Components: Karaf
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
>Priority: Major
> Fix For: Karaf Launchpad Integration Tests (Oak Tar) 0.0.12, 
> Karaf Integration Tests 1.0.0, Karaf Distribution 1.0.0, Karaf Features 
> 1.0.0, Karaf Configs 1.0.0
>
>




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


jenkins configuration rights

2020-11-30 Thread Nicolas Peltier
Hey,

i'd like to switch pipes build to java 11, but i don't seem to have jenkins
right to modify that build (i guess this is there i would do it).
Can someone give this to me? Can i be pointed to some documentation to do
so? Am happy creating that documentation if needed.

Nicolas


[GitHub] [sling-org-apache-sling-servlets-resolver] karlpauls merged pull request #13: SLING-9949: speed-up bundled script resolution

2020-11-30 Thread GitBox


karlpauls merged pull request #13:
URL: https://github.com/apache/sling-org-apache-sling-servlets-resolver/pull/13


   



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




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

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

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

[GitHub] [sling-org-apache-sling-servlets-resolver] sonarcloud[bot] commented on pull request #13: SLING-9949: speed-up bundled script resolution

2020-11-30 Thread GitBox


sonarcloud[bot] commented on pull request #13:
URL: 
https://github.com/apache/sling-org-apache-sling-servlets-resolver/pull/13#issuecomment-735719173


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=VULNERABILITY)
  
   [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-servlets-resolver=13=false=SECURITY_HOTSPOT)
 [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-servlets-resolver=13=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-servlets-resolver=13=false=SECURITY_HOTSPOT)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=CODE_SMELL)
 [1 Code 
Smell](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-servlets-resolver=13=new_coverage=list)
 [0.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-servlets-resolver=13=new_coverage=list)
  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-servlets-resolver=13=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-servlets-resolver=13=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 
soon. 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




[GitHub] [sling-org-apache-sling-servlets-resolver] sonarcloud[bot] removed a comment on pull request #13: SLING-9949: speed-up bundled script resolution

2020-11-30 Thread GitBox


sonarcloud[bot] removed a comment on pull request #13:
URL: 
https://github.com/apache/sling-org-apache-sling-servlets-resolver/pull/13#issuecomment-735707209


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=VULNERABILITY)
  
   [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-servlets-resolver=13=false=SECURITY_HOTSPOT)
 [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-servlets-resolver=13=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-servlets-resolver=13=false=SECURITY_HOTSPOT)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=CODE_SMELL)
 [3 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-servlets-resolver=13=new_coverage=list)
 [0.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-servlets-resolver=13=new_coverage=list)
  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-servlets-resolver=13=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-servlets-resolver=13=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 
soon. 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




Re: Dynamic Class Loader Manager causes lots of service restarts

2020-11-30 Thread Julian Sedding
Hi Wim

I looked into this issue back then and concluded that it may not be
feasible at all to (significantly) improve the restart-performance of
the DCLM. The reason is that it is very hard or impossible to
correctly replace class-loaders due to JVM internal caching (I forgot
the details, it's been a while). If resolving this is at all possible,
it would IMHO require a lot of time.

However, I had success improving performance of deployments on AEM 6.5
by following an (unrelated) suggestion by Jörg Hoh:
https://cqdump.wordpress.com/2020/07/13/slow-deployments-on-aem-6-4-6-5/

The only other thing I know can help is keeping models in a separate
bundle from your other code. If no other bundles improt code from your
model-bundle, their restart is cheaper.

Regards
Julian

On Fri, Nov 27, 2020 at 9:50 AM Wim Symons  wrote:
>
> Hi all,
>
> We upgraded from AEM 6.4 to AEM 6.5 last week and unfortunately we learned 
> about DLCM.
>
> Before AEM 6.5 we had absolutely no trouble to keep the AEM author online 
> while deploying and had no JSP/HTL errors during deploys.
> As of AEM 6.5 that changed for the worse.
>
> Because of all the Sling models we use, every we time we deploy any of our 
> applications, DLCM gets unregistered/registered,
> causing also the JSP/HTL compilation to fail.
>
> This results in the author UI responding with HTTP 404 messages until DLCM is 
> registered and active again.
>
> In the log files, this looks like:
>
> 20.11.2020 14:31:18.385 *DEBUG* [OsgiInstallerImpl] 
> org.apache.sling.commons.classloader.impl.Activator Dynamic Class Loader is 
> reloaded because it has previously loaded classes from bundle '[blanked-out]' 
> which is no longer active
> ...
> 20.11.2020 14:31:18.928 *INFO* [OsgiInstallerImpl] 
> org.apache.sling.scripting.sightly Service 
> [org.apache.sling.scripting.sightly.impl.engine.compiled.SlingHTLMasterCompiler,41500,
>  
> [org.apache.sling.scripting.sightly.impl.engine.compiled.SlingHTLMasterCompiler]]
>  ServiceEvent UNREGISTERING
>
> As of that point, navigating around in the UI results in browser errors like:
>
> Missing Compilation Support.
>
> Cannot serve request to /sites.html/content/[blanked-out] in 
> /libs/granite/ui/components/shell/header/user/user.html
>
> Exception:
>
> javax.script.ScriptException: Missing compilation support.
>   at 
> org.apache.sling.scripting.sightly.impl.engine.SightlyScriptEngine.compile(SightlyScriptEngine.java:60)
>   ...
>
> A while (10-60 seconds, depending on the application being deployed) later, 
> the logs look like:
>
> 20.11.2020 14:31:32.219 *INFO* [OsgiInstallerImpl] 
> org.apache.sling.scripting.sightly Service 
> [org.apache.sling.scripting.sightly.impl.engine.compiled.SlingHTLMasterCompiler,44334,
>  
> [org.apache.sling.scripting.sightly.impl.engine.compiled.SlingHTLMasterCompiler]]
>  ServiceEvent REGISTERED
> 20.11.2020 14:31:32.232 *INFO* [OsgiInstallerImpl] 
> org.apache.sling.scripting.sightly.impl.engine.compiled.SlingHTLMasterCompiler
>  Activating 
> org.apache.sling.scripting.sightly.impl.engine.compiled.SlingHTLMasterCompiler
>
> And after that, all is fine again.
>
> As this post is already a year old, I’m wondering if there was any progress 
> in this area?
>
> I also noticed a (significant?) difference in the 
> org.apache.sling.scripting.sightly.impl.engine.compiled.SlingHTLMasterCompiler
>  class.
> There the DLCM is referenced with the greedy option, while in 
> org.apache.sling.scripting.sightly.models.impl.SlingModelsUseProvider and 
> org.apache.sling.scripting.jsp.JspScriptEngineFactory this is referenced with 
> the reluctant option.
> Can anyone explain why this is the case?
>
> I can only hope this gets fixed/improved in Apache Sling soon and see it 
> appear in an upcoming AEM 6.5 Service Pack.
>
> Kind regards and hope to hear something soon,
>
> Wim Symons
>
> P.S. I hope this gets attached to the correct thread.
>
>
> On 2019/10/25 09:07:42, Julian Sedding  wrote:
> > @Konrad: I agree that on AEM the JCR package manager is the main>
> > issue. However, I believe the JSP implementation of the REST API has>
> > already been replaced with the PackageManagerServlet. The problem is>
> > that the PackageManagerServlet has a reference to the DCLM in order to>
> > allow InstallHook implementations to load classes from OSGi.>
> >
> > Regards>
> > Julian>
> >
> > On Fri, Oct 25, 2019 at 8:51 AM Konrad Windszus  
> > wrote:>
> > >>
> > > One of the main issues with the DCLM restart is the availability of the 
> > > AEM package manager itself. As the AEM package manager ReST endpoint 
> > > depends as well on the DCLM (written in JSP) it is usually restarted 
> > > after a bundle deployment triggered by package installation (and 
> > > therefore for quite a time no longer available for a subsequent package 
> > > installation). Although some of the pain has been taken with 
> > > https://issues.apache.org/jira/browse/SLING-3747 
> > > 

[jira] [Assigned] (SLING-9839) Jenkins: Sonarcloud analysis with Java 11

2020-11-30 Thread Konrad Windszus (Jira)


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

Konrad Windszus reassigned SLING-9839:
--

Assignee: Konrad Windszus

> Jenkins: Sonarcloud analysis with Java 11
> -
>
> Key: SLING-9839
> URL: https://issues.apache.org/jira/browse/SLING-9839
> Project: Sling
>  Issue Type: Improvement
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> As SonarSource is stopping support for Java 8 analysis 
> (https://sonarcloud.io/documentation/appendices/move-analysis-java-11/), we 
> should switch to matrix builds with Jenkins with Java 8 and 11 builds in 
> parallel 
> (https://www.jenkins.io/blog/2019/12/02/matrix-building-with-scripted-pipeline/
>  ).
> The Java 8 build should be deployed to Apache Snapshots (for backwards 
> compatibility reasons). The Java 11 build should be used for coverage 
> analysis and sonar execution..



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


[GitHub] [sling-org-apache-sling-servlets-resolver] sonarcloud[bot] commented on pull request #13: SLING-9949: speed-up bundled script resolution

2020-11-30 Thread GitBox


sonarcloud[bot] commented on pull request #13:
URL: 
https://github.com/apache/sling-org-apache-sling-servlets-resolver/pull/13#issuecomment-735707209


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=VULNERABILITY)
  
   [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-servlets-resolver=13=false=SECURITY_HOTSPOT)
 [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-servlets-resolver=13=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-servlets-resolver=13=false=SECURITY_HOTSPOT)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=CODE_SMELL)
 [3 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver=13=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-servlets-resolver=13=new_coverage=list)
 [0.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-servlets-resolver=13=new_coverage=list)
  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-servlets-resolver=13=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-servlets-resolver=13=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 
soon. 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




[GitHub] [sling-org-apache-sling-servlets-resolver] karlpauls opened a new pull request #13: SLING-9949: speed-up bundled script resolution

2020-11-30 Thread GitBox


karlpauls opened a new pull request #13:
URL: https://github.com/apache/sling-org-apache-sling-servlets-resolver/pull/13


   



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-9949) Speed bundled scripts resolution

2020-11-30 Thread Karl Pauls (Jira)
Karl Pauls created SLING-9949:
-

 Summary: Speed bundled scripts resolution
 Key: SLING-9949
 URL: https://issues.apache.org/jira/browse/SLING-9949
 Project: Sling
  Issue Type: Improvement
  Components: Scripting
Affects Versions: Servlets Resolver 2.7.10
Reporter: Karl Pauls
Assignee: Karl Pauls
 Fix For: Servlets Resolver 2.7.12


When resolving bundled scripts the resolver is currently parsing the metadata 
several times. That can be avoided using caching the parsed result.

Furthermore, the bundled script servlet is currently calculating the providers 
on each request. That can be avoided by doing the calculation one time when it 
is created. Additionally, it should unroll servlet exceptions instead of 
wrapping them again in a servlet exception.

Finally, the MergingResourceProvider does right now construct its resource tree 
completely from scratch every time a servlet is added - that can be avoided by 
just adding the servlet to the existing tree.



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


[jira] [Updated] (SLING-9949) Speed-up bundled scripts resolution

2020-11-30 Thread Karl Pauls (Jira)


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

Karl Pauls updated SLING-9949:
--
Summary: Speed-up bundled scripts resolution  (was: Speed bundled scripts 
resolution)

> Speed-up bundled scripts resolution
> ---
>
> Key: SLING-9949
> URL: https://issues.apache.org/jira/browse/SLING-9949
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Affects Versions: Servlets Resolver 2.7.10
>Reporter: Karl Pauls
>Assignee: Karl Pauls
>Priority: Major
> Fix For: Servlets Resolver 2.7.12
>
>
> When resolving bundled scripts the resolver is currently parsing the metadata 
> several times. That can be avoided using caching the parsed result.
> Furthermore, the bundled script servlet is currently calculating the 
> providers on each request. That can be avoided by doing the calculation one 
> time when it is created. Additionally, it should unroll servlet exceptions 
> instead of wrapping them again in a servlet exception.
> Finally, the MergingResourceProvider does right now construct its resource 
> tree completely from scratch every time a servlet is added - that can be 
> avoided by just adding the servlet to the existing tree.



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


[jira] [Resolved] (SLING-9797) move pipe should accept relative paths

2020-11-30 Thread Nicolas Peltier (Jira)


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

Nicolas Peltier resolved SLING-9797.

Fix Version/s: Pipes 4.0.1
   Resolution: Fixed

> move pipe should accept relative paths
> --
>
> Key: SLING-9797
> URL: https://issues.apache.org/jira/browse/SLING-9797
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions
>Affects Versions: Pipes 4.0.0
>Reporter: Nicolas Peltier
>Assignee: Nicolas Peltier
>Priority: Major
> Fix For: Pipes 4.0.1
>
>
> we should be able to do something like `echo /content/foo | mv bar`
> in that case the move pipe takes parent of input resource, for the moment, we 
> are forced to add path `echo /content/foo | mv ${path.one}/bar`  which is not 
> obvious :)



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


[jira] [Assigned] (SLING-9797) move pipe should accept relative paths

2020-11-30 Thread Nicolas Peltier (Jira)


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

Nicolas Peltier reassigned SLING-9797:
--

Assignee: Nicolas Peltier

> move pipe should accept relative paths
> --
>
> Key: SLING-9797
> URL: https://issues.apache.org/jira/browse/SLING-9797
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions
>Affects Versions: Pipes 4.0.0
>Reporter: Nicolas Peltier
>Assignee: Nicolas Peltier
>Priority: Major
>
> we should be able to do something like `echo /content/foo | mv bar`
> in that case the move pipe takes parent of input resource, for the moment, we 
> are forced to add path `echo /content/foo | mv ${path.one}/bar`  which is not 
> obvious :)



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