Re: state of sling-org-apache-sling-starter

2020-11-27 Thread Ruben Reusser

Eric,

thank you - there seems to be quite a list of outdated bundles int the 
starter even outside of sling itself. I am trying to wrap my head around 
how to make bring everything safely up to date.


it looks like some of the versions in use have known security 
vulnerabilities.


Ruben

On 11/27/2020 1:28 PM, Eric Norman wrote:

Hi Ruben,

I've just fixed the org.apache.sling.jcr.contentloader item from your
list.  It might be worth opening a new issue in jira for tracking the
others.

FYI: I usually use the following command to produce a report on
dependencies that are not the latest version:

*mvn versions:display-dependency-updates*


Regards,
-Eric

On Tue, Nov 24, 2020 at 9:06 PM Ruben Reusser  wrote:


here's the current list of mismatches:

org.apache.sling.commons.fsclassloader starter: 1.0.14 downloads: 1.0.8
org.apache.sling.commons.scheduler starter: 2.7.6 downloads: 2.7.2
org.apache.sling.models.impl starter: 1.4.12 downloads: 1.4.16
org.apache.sling.serviceusermapper starter: 1.4.4 downloads: 1.4.2
org.apache.sling.servlets.resolver starter: 2.7.10 downloads: 2.7.8
org.apache.sling.commons.johnzon starter: 1.2.4 downloads: 1.2.6
org.apache.sling.commons.osgi starter: 2.4.0 downloads: 2.4.2
org.apache.sling.installer.core starter: 3.11.2 downloads: 3.11.4
org.apache.sling.settings starter: 1.4.0 downloads: 1.4.2
org.apache.sling.discovery.oak starter: 1.2.28 downloads: 1.2.30
org.apache.sling.discovery.support starter: 1.0.4 downloads: 1.0.6
org.apache.sling.jcr.contentloader starter: 2.3.0 downloads: 2.4.0
org.apache.sling.extensions.webconsolesecurityprovider starter: 1.2.4
downloads: 1.2.2


On Tue, Nov 24, 2020 at 5:13 pm, Bertrand Delacretaz
 wrote:

Hi Ruben,

On Tue, Nov 24, 2020 at 4:29 PM Ruben Reusser mailto:r...@headwire.com>> wrote:

  ...is there a process to update the starter and the downloads page
when a
  new version of a bundle is released?...

Updating it is part of our release instructions at
<

https://sling.apache.org/documentation/development/release-management.html#update-the-sling-starter-module-1


But I suspect we miss that sometimes - patches welcome of course!

-Bertrand




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

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

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

Re: state of sling-org-apache-sling-starter

2020-11-27 Thread Eric Norman
Hi Ruben,

I've just fixed the org.apache.sling.jcr.contentloader item from your
list.  It might be worth opening a new issue in jira for tracking the
others.

FYI: I usually use the following command to produce a report on
dependencies that are not the latest version:

*mvn versions:display-dependency-updates*


Regards,
-Eric

On Tue, Nov 24, 2020 at 9:06 PM Ruben Reusser  wrote:

> here's the current list of mismatches:
>
> org.apache.sling.commons.fsclassloader starter: 1.0.14 downloads: 1.0.8
> org.apache.sling.commons.scheduler starter: 2.7.6 downloads: 2.7.2
> org.apache.sling.models.impl starter: 1.4.12 downloads: 1.4.16
> org.apache.sling.serviceusermapper starter: 1.4.4 downloads: 1.4.2
> org.apache.sling.servlets.resolver starter: 2.7.10 downloads: 2.7.8
> org.apache.sling.commons.johnzon starter: 1.2.4 downloads: 1.2.6
> org.apache.sling.commons.osgi starter: 2.4.0 downloads: 2.4.2
> org.apache.sling.installer.core starter: 3.11.2 downloads: 3.11.4
> org.apache.sling.settings starter: 1.4.0 downloads: 1.4.2
> org.apache.sling.discovery.oak starter: 1.2.28 downloads: 1.2.30
> org.apache.sling.discovery.support starter: 1.0.4 downloads: 1.0.6
> org.apache.sling.jcr.contentloader starter: 2.3.0 downloads: 2.4.0
> org.apache.sling.extensions.webconsolesecurityprovider starter: 1.2.4
> downloads: 1.2.2
>
>
> On Tue, Nov 24, 2020 at 5:13 pm, Bertrand Delacretaz
>  wrote:
> > Hi Ruben,
> >
> > On Tue, Nov 24, 2020 at 4:29 PM Ruben Reusser  > > wrote:
> >>  ...is there a process to update the starter and the downloads page
> >> when a
> >>  new version of a bundle is released?...
> >
> > Updating it is part of our release instructions at
> > <
> https://sling.apache.org/documentation/development/release-management.html#update-the-sling-starter-module-1
> >
> >
> > But I suspect we miss that sometimes - patches welcome of course!
> >
> > -Bertrand
>
>


[GitHub] [sling-org-apache-sling-jcr-webconsole] kwin commented on a change in pull request #2: Feature/cnd exporter

2020-11-27 Thread GitBox


kwin commented on a change in pull request #2:
URL: 
https://github.com/apache/sling-org-apache-sling-jcr-webconsole/pull/2#discussion_r531721369



##
File path: 
src/main/java/org/apache/sling/jcr/webconsole/internal/CndPrinter.java
##
@@ -0,0 +1,74 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.jcr.webconsole.internal;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import javax.jcr.NamespaceRegistry;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.nodetype.NodeTypeIterator;
+
+import org.apache.felix.inventory.Format;
+import org.apache.felix.inventory.InventoryPrinter;
+import org.apache.jackrabbit.commons.cnd.CompactNodeTypeDefWriter;
+import org.apache.sling.jcr.api.SlingRepository;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
+
+@Component(property = { InventoryPrinter.NAME + "=JCR CND", 
InventoryPrinter.FORMAT + "=TEXT",
+InventoryPrinter.TITLE + "=JCR Compact Node Type and Name Space 
Definition (CND)" })
+public class CndPrinter implements InventoryPrinter {
+
+@Reference
+private SlingRepository slingRepository;
+
+@Override
+public void print(PrintWriter printWriter, Format format, boolean isZip) {
+Session session = null;
+try {
+session = slingRepository.loginAdministrative(null);
+final CompactNodeTypeDefWriter cnd = new 
CompactNodeTypeDefWriter(printWriter, session, true);
+List prefixes = 
Arrays.asList(session.getWorkspace().getNamespaceRegistry().getPrefixes());
+Collections.sort(prefixes);
+for (String prefix : prefixes) {
+if (!prefix.equals(NamespaceRegistry.PREFIX_EMPTY)) {
+cnd.writeNamespaceDeclaration(prefix);
+}
+}
+NodeTypeIterator ntIterator = 
session.getWorkspace().getNodeTypeManager().getAllNodeTypes();
+while (ntIterator.hasNext()) {
+cnd.write(ntIterator.nextNodeType());
+}
+cnd.close();
+} catch (RepositoryException | IOException e) {
+printWriter.println("Unable to output CND.");
+e.printStackTrace(printWriter);

Review comment:
   This doesn't print to `System.err` but to the Servlet response's writer, 
so I think this should be fine.





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: [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 Convert

2020-11-27 Thread David Bosschaert
+1

David

On Fri, 27 Nov 2020 at 15:38, Carsten Ziegeler  wrote:

> +1
>
> Carsten
>
> Am 27.11.2020 um 16:34 schrieb dav...@apache.org:
> > 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
> >
>
> --
> --
> Carsten Ziegeler
> Adobe Research Switzerland
> cziege...@apache.org
>


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

2020-11-27 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler commented on SLING-9857:
-

[~angela] Regading moving the user node if the path needs to be adjusted, is 
there a special API for this?
I assume deleting/recreating might loose other information stored below the 
user node

> 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)


Re: [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 Convert

2020-11-27 Thread Carsten Ziegeler

+1

Carsten

Am 27.11.2020 um 16:34 schrieb dav...@apache.org:

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



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


Re: [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 Convert

2020-11-27 Thread Karl Pauls
+1

regards,

Karl

On Fri, Nov 27, 2020 at 4:34 PM  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



-- 
Karl Pauls
karlpa...@gmail.com


[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 Converter 1

2020-11-27 Thread davidb
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-9692) Add support for principal-based access control entries

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


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

A. J. David Bosschaert updated SLING-9692:
--
Fix Version/s: (was: Content-Package to Feature Model Converter 1.0.22)
   Content-Package to Feature Model Converter 1.0.24

> Add support for principal-based access control entries
> --
>
> Key: SLING-9692
> URL: https://issues.apache.org/jira/browse/SLING-9692
> Project: Sling
>  Issue Type: Improvement
>  Components: Content-Package to Feature Model Converter
>Reporter: Robert Munteanu
>Priority: Major
> Fix For: Content-Package to Feature Model Converter 1.0.24
>
>
> When passed a content package that contains principal-based access control 
> entries, the converter ignores them. It should instead generate the proper 
> repoinit statements.



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


[jira] [Updated] (SLING-9926) Wrong PID if configuration is in a nested folder

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


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

A. J. David Bosschaert updated SLING-9926:
--
Fix Version/s: (was: Content-Package to Feature Model Converter 1.0.22)
   Content-Package to Feature Model Converter 1.0.24

> 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
>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)


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

2020-11-27 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 resolved SLING-9947.
---
Resolution: Fixed

> 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)


[GitHub] [sling-org-apache-sling-jcr-webconsole] stefanseifert commented on a change in pull request #2: Feature/cnd exporter

2020-11-27 Thread GitBox


stefanseifert commented on a change in pull request #2:
URL: 
https://github.com/apache/sling-org-apache-sling-jcr-webconsole/pull/2#discussion_r531657846



##
File path: 
src/main/java/org/apache/sling/jcr/webconsole/internal/CndPrinter.java
##
@@ -0,0 +1,74 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.jcr.webconsole.internal;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import javax.jcr.NamespaceRegistry;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.nodetype.NodeTypeIterator;
+
+import org.apache.felix.inventory.Format;
+import org.apache.felix.inventory.InventoryPrinter;
+import org.apache.jackrabbit.commons.cnd.CompactNodeTypeDefWriter;
+import org.apache.sling.jcr.api.SlingRepository;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
+
+@Component(property = { InventoryPrinter.NAME + "=JCR CND", 
InventoryPrinter.FORMAT + "=TEXT",
+InventoryPrinter.TITLE + "=JCR Compact Node Type and Name Space 
Definition (CND)" })
+public class CndPrinter implements InventoryPrinter {
+
+@Reference
+private SlingRepository slingRepository;
+
+@Override
+public void print(PrintWriter printWriter, Format format, boolean isZip) {
+Session session = null;
+try {
+session = slingRepository.loginAdministrative(null);
+final CompactNodeTypeDefWriter cnd = new 
CompactNodeTypeDefWriter(printWriter, session, true);
+List prefixes = 
Arrays.asList(session.getWorkspace().getNamespaceRegistry().getPrefixes());
+Collections.sort(prefixes);
+for (String prefix : prefixes) {
+if (!prefix.equals(NamespaceRegistry.PREFIX_EMPTY)) {
+cnd.writeNamespaceDeclaration(prefix);
+}
+}
+NodeTypeIterator ntIterator = 
session.getWorkspace().getNodeTypeManager().getAllNodeTypes();
+while (ntIterator.hasNext()) {
+cnd.write(ntIterator.nextNodeType());
+}
+cnd.close();
+} catch (RepositoryException | IOException e) {
+printWriter.println("Unable to output CND.");
+e.printStackTrace(printWriter);

Review comment:
   printing to system.err seems to be a bad idea - but obviously the other 
consoles that are already there use the same pattern atm.





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-9916) Content package converter produces broken configs for typed configuration entries.

2020-11-27 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9916.
-

> Content package converter produces broken configs for typed configuration 
> entries.
> --
>
> Key: SLING-9916
> URL: https://issues.apache.org/jira/browse/SLING-9916
> Project: Sling
>  Issue Type: Bug
>  Components: Feature Model
>Affects Versions: Content-Package to Feature Model Converter 1.0.18
>Reporter: Karl Pauls
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Content-Package to Feature Model Converter 1.0.20
>
>
> The converter converts configurations from jcr trying to respect their types 
> but in doing so it (unnecessarily) adds the type information to the keys. 
> That wouldn't be a problem, however, it doesn't do it correctly for multiple 
> of type String. In that case, it ends up adding just "[]" to the key - which 
> changes the keyname. 



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


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

2020-11-27 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler resolved SLING-9867.
-
Resolution: Fixed

The branch has been merged, updated docs

> 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] [Updated] (SLING-9867) Add extension to provide metadata about configuration api

2020-11-27 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler updated SLING-9867:

Fix Version/s: Feature Model API Regions Extension 1.1.14

> 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] [Assigned] (SLING-9867) Add extension to provide metadata about configuration api

2020-11-27 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler reassigned SLING-9867:
---

Assignee: Carsten Ziegeler

> 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
>
> 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)


Re: [RESULT] [VOTE] Release Apache Sling Content-Package to Feature Model Converter 1.0.20

2020-11-27 Thread Karl Pauls
Time to call the vote on the Apache Sling Content-Package to Feature
Model Converter 1.0.20 release.

* +1 votes from Carsten Ziegeler, David Bosschaert, Daniel Klco, and Karl Pauls.

* No other votes.

The vote is successful. I will make the artifacts available as soon as possible.


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

2020-11-27 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 updated SLING-9947:
--
Description: The feature model launcher should use feature model 1.2.16. 
Because it embeds it, a new release of the launcher must be made.  (was: The 
feature model launcher should use feature model 1.2.14. Because it embeds it, a 
new release of the launcher must be made.)

> 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] [Updated] (SLING-9947) Update Feature Model Launcher to latest feature model

2020-11-27 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 updated SLING-9947:
--
Fix Version/s: (was: Feature Model Launcher 1.1.12)
   Feature Model Launcher 1.1.14

> 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.14. 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] [Updated] (SLING-9947) Update Feature Model Launcher to latest feature model

2020-11-27 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 updated SLING-9947:
--
Affects Version/s: (was: Feature Model Launcher 1.1.10)
   Feature Model Launcher 1.1.12

> 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.12
>
>
> The feature model launcher should use feature model 1.2.14. 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] [Created] (SLING-9947) Update Feature Model Launcher to latest feature model

2020-11-27 Thread A. J. David Bosschaert (Jira)
A. J. David Bosschaert created SLING-9947:
-

 Summary: 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.10
Reporter: A. J. David Bosschaert
Assignee: A. J. David Bosschaert
 Fix For: Feature Model Launcher 1.1.12


The feature model launcher should use feature model 1.2.14. 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] [Resolved] (SLING-9927) Allow java.* imports to be defined, in line with OSGi R7

2020-11-27 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 resolved SLING-9927.
---
Resolution: Fixed

> 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)


Re: [VOTE] Release Apache Sling Content-Package to Feature Model Converter 1.0.20

2020-11-27 Thread Karl Pauls
+1

regards,


Karl

On Tue, Nov 17, 2020 at 5:01 PM Daniel Klco  wrote:
>
> +1
>
> On Tue, Nov 17, 2020 at 10:51 AM  wrote:
> >
> > +1
> >
> > David
> >
> > On Tue, 17 Nov 2020 at 15:44, Carsten Ziegeler  wrote:
> >
> > > +1
> > >
> > > Carsten
> > >
> > > Am 17.11.2020 um 16:41 schrieb Karl Pauls:
> > > > Hi all,
> > > >
> > > > I would like to call the release on the Content-Package to Feature Model
> > > > Converter 1.0.20
> > > > https://issues.apache.org/jira/projects/SLING/versions/12349401
> > > >
> > > > Staging repository:
> > > > https://repository.apache.org/content/repositories/orgapachesling-2380
> > > >
> > > > 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 2380 /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.
> > > >
> > >
> > > --
> > > --
> > > Carsten Ziegeler
> > > Adobe Research Switzerland
> > > cziege...@apache.org
> > >



-- 
Karl Pauls
karlpa...@gmail.com


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

2020-11-27 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 resolved SLING-9937.
---
Resolution: Fixed

> 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)


[GitHub] [sling-org-apache-sling-feature-extension-apiregions] bosschaert merged pull request #14: SLING-9937 api-regions-crossfeature-dups should work if all exports come from API Regions

2020-11-27 Thread GitBox


bosschaert merged pull request #14:
URL: 
https://github.com/apache/sling-org-apache-sling-feature-extension-apiregions/pull/14


   



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-9946) Update to latest parent, switch to OSGi annotations, migrate to InventoryPrinter

2020-11-27 Thread Konrad Windszus (Jira)


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

Konrad Windszus commented on SLING-9946:


PR: https://github.com/apache/sling-org-apache-sling-jcr-webconsole/pull/1/files

> Update to latest parent, switch to OSGi annotations, migrate to 
> InventoryPrinter
> 
>
> Key: SLING-9946
> URL: https://issues.apache.org/jira/browse/SLING-9946
> Project: Sling
>  Issue Type: Improvement
>  Components: JCR
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: JCR Web Console 1.0.4
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>




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


[jira] [Commented] (SLING-9945) Expose CND via Felix Web Console Plugin

2020-11-27 Thread Konrad Windszus (Jira)


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

Konrad Windszus commented on SLING-9945:


PR: https://github.com/apache/sling-org-apache-sling-jcr-webconsole/pull/2

> Expose CND via Felix Web Console Plugin
> ---
>
> Key: SLING-9945
> URL: https://issues.apache.org/jira/browse/SLING-9945
> Project: Sling
>  Issue Type: Improvement
>  Components: JCR
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: JCR Web Console 1.0.4
>
>
> It would be nice to add a Felix Web Console Inventory Printer similar to 
> https://github.com/apache/jackrabbit-oak/blob/29f3393341c30aa44d976d998e5613afb6398a23/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/inventory/IndexPrinter.java
>  which exposes the full CND 
> (https://jackrabbit.apache.org/jcr/node-type-notation.html) of the underlying 
> repository



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


[GitHub] [sling-org-apache-sling-jcr-webconsole] sonarcloud[bot] commented on pull request #2: Feature/cnd exporter

2020-11-27 Thread GitBox


sonarcloud[bot] commented on pull request #2:
URL: 
https://github.com/apache/sling-org-apache-sling-jcr-webconsole/pull/2#issuecomment-734736982


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=VULNERABILITY)
  
   [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=SECURITY_HOTSPOT)
 [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=SECURITY_HOTSPOT)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=CODE_SMELL)
 [6 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-webconsole=2=new_coverage=list)
 [0.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-webconsole=2=new_coverage=list)
  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-webconsole=2=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-webconsole=2=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-jcr-webconsole] sonarcloud[bot] removed a comment on pull request #2: Feature/cnd exporter

2020-11-27 Thread GitBox


sonarcloud[bot] removed a comment on pull request #2:
URL: 
https://github.com/apache/sling-org-apache-sling-jcr-webconsole/pull/2#issuecomment-734735808


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=VULNERABILITY)
  
   [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=SECURITY_HOTSPOT)
 [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=SECURITY_HOTSPOT)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=CODE_SMELL)
 [6 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=2=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-webconsole=2=new_coverage=list)
 [0.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-webconsole=2=new_coverage=list)
  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-webconsole=2=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-webconsole=2=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-jcr-webconsole] sonarcloud[bot] commented on pull request #1: SLING-9946 switch to latest parent

2020-11-27 Thread GitBox


sonarcloud[bot] commented on pull request #1:
URL: 
https://github.com/apache/sling-org-apache-sling-jcr-webconsole/pull/1#issuecomment-734730300


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=1=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=1=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=1=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=1=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=1=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=1=false=VULNERABILITY)
  
   [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-webconsole=1=false=SECURITY_HOTSPOT)
 [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-webconsole=1=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-webconsole=1=false=SECURITY_HOTSPOT)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=1=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=1=false=CODE_SMELL)
 [5 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-webconsole=1=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-webconsole=1=new_coverage=list)
 [0.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-webconsole=1=new_coverage=list)
  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-webconsole=1=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-webconsole=1=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-jcr-webconsole] kwin opened a new pull request #1: SLING-9946 switch to latest parent

2020-11-27 Thread GitBox


kwin opened a new pull request #1:
URL: https://github.com/apache/sling-org-apache-sling-jcr-webconsole/pull/1


   



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-27 Thread Wim Symons
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 
> > , it is still an issue 
> > for subsequent package installations.>
> > I guess much of the pain would already be resolved in case something like 
> > https://issues.apache.org/jira/browse/JCRVLT-151 
> >  would be implemented in 
> > a way which doesn't rely on scripts (but rather on precompiled servlets).>
> > Konrad>
> >>
> >>
> > > On 22. Oct 2019, at 10:21, Konrad Windszus  wrote:>
> > >>
> > > Hi Julian,>
> > > thanks a lot for bringing up this topic. Indeed the restart cascade 
> > > causes some issues for me as well. Just invalidating the cache of the 
> > > DCLM without restarting it fully sounds reasonable to me, but I am not 
> > > that familiar with class loader insights. I vaguely remember that the 
> > > restart might be necessary due to static cache fields but I don't 
> > > remember the details...>
> > > Maybe Carsten remembers...>
> > > Konrad>
> > >>
> > >> On 22. Oct 2019, at 10:00, 

[jira] [Created] (SLING-9946) Update to latest parent, switch to OSGi annotations, migrate to InventoryPrinter

2020-11-27 Thread Konrad Windszus (Jira)
Konrad Windszus created SLING-9946:
--

 Summary: Update to latest parent, switch to OSGi annotations, 
migrate to InventoryPrinter
 Key: SLING-9946
 URL: https://issues.apache.org/jira/browse/SLING-9946
 Project: Sling
  Issue Type: Improvement
  Components: JCR
Reporter: Konrad Windszus
Assignee: Konrad Windszus
 Fix For: JCR Web Console 1.0.4






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


[jira] [Updated] (SLING-9945) Expose CND via Felix Web Console Plugin

2020-11-27 Thread Konrad Windszus (Jira)


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

Konrad Windszus updated SLING-9945:
---
Fix Version/s: JCR Web Console 1.0.4

> Expose CND via Felix Web Console Plugin
> ---
>
> Key: SLING-9945
> URL: https://issues.apache.org/jira/browse/SLING-9945
> Project: Sling
>  Issue Type: Improvement
>  Components: JCR
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: JCR Web Console 1.0.4
>
>
> It would be nice to add a Felix Web Console Inventory Printer similar to 
> https://github.com/apache/jackrabbit-oak/blob/29f3393341c30aa44d976d998e5613afb6398a23/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/inventory/IndexPrinter.java
>  which exposes the full CND 
> (https://jackrabbit.apache.org/jcr/node-type-notation.html) of the underlying 
> repository



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


[jira] [Moved] (SLING-9945) Expose CND via Felix Web Console Plugin

2020-11-27 Thread Konrad Windszus (Jira)


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

Konrad Windszus moved OAK-9289 to SLING-9945:
-

Component/s: (was: core)
 JCR
Key: SLING-9945  (was: OAK-9289)
   Workflow: no-reopen-closed,doc-test-required  (was: no-reopen-closed)
Project: Sling  (was: Jackrabbit Oak)

> Expose CND via Felix Web Console Plugin
> ---
>
> Key: SLING-9945
> URL: https://issues.apache.org/jira/browse/SLING-9945
> Project: Sling
>  Issue Type: Improvement
>  Components: JCR
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
>
> It would be nice to add a Felix Web Console Inventory Printer similar to 
> https://github.com/apache/jackrabbit-oak/blob/29f3393341c30aa44d976d998e5613afb6398a23/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/inventory/IndexPrinter.java
>  which exposes the full CND 
> (https://jackrabbit.apache.org/jcr/node-type-notation.html) of the underlying 
> repository



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


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

2020-11-27 Thread GitBox


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



##
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 "

Review comment:
   don't we have redundant information here then? we'll see that 
SlingPostServlet is logging a PersistenceException, and we'll have a line 
saying "PersistenceException while handling POST"?
   

##
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:
   How are we sure (or just mostly certain) that a persistence exception is 
a 405 and not a 500? while agreeing on the general topic of that change, we 
should not revert the fake info and say everything is an ACL issue. Is this 
what you were mentioning at the beginning of the PR? Do you think we could add 
tests mocking real world issue? 





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-9928) Sling el-api embeds vulnerable version of el-api

2020-11-27 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler closed SLING-9928.
---

> Sling el-api embeds vulnerable version of el-api
> 
>
> Key: SLING-9928
> URL: https://issues.apache.org/jira/browse/SLING-9928
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Akanksha Jain
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Scripting EL API Wrapper 1.0.4
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> *Issue summary :* Security issues reported under org.apache.tomcat
> *Vulnerabilities*
> CVE-2014-7810 5.0 org.apache.tomcat : el-api : 6.0.14
> [https://nvd.nist.gov/vuln/detail/CVE-2014-7810]
> el-api-6.0.14 is embedded by org.apache.sling.scripting.el-api.
> Expected: Need to update el-api version in org.apache.sling.scripting.el-api.



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


[VOTE RESULT] Release org.apache.sling.scripting.el-api 1.0.4

2020-11-27 Thread Carsten Ziegeler

The vote passes with three binding +1 votes

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