[jira] [Commented] (SLING-2938) AdapterMethods annotation and adapter proxy service

2020-11-06 Thread Henry Kuijpers (Jira)


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

Henry Kuijpers commented on SLING-2938:
---

I like what you have some with regards to combining the IT with the actual 
production code, [~bdelacretaz]! I completely agree that the 2 should be tied 
together, as of course they strictly depend on each other. Currently on my 
mobile phone, so I'll try to have a look tomorrow on my laptop as well. As long 
as the tests run properly, then here's already my +1. 

The reason I put them in a separate repository, is because that was more in 
line with the sling servlet annotations tests. So we might consider doing the 
same thing over there as well then. 

I'm also very glad that the Sling starter hanging issue seems to be solved! 

I'm however afraid that the build that you're referencing (adapter-annotations) 
is the wrong one: This is a module that is used to generate the 
SLING-INF/adapters.json file inside the bundle. 

> AdapterMethods annotation and adapter proxy service
> ---
>
> Key: SLING-2938
> URL: https://issues.apache.org/jira/browse/SLING-2938
> Project: Sling
>  Issue Type: Bug
>  Components: Engine, Extensions
>Affects Versions: Adapter 2.1.0
>Reporter: Bertrand Delacretaz
>Priority: Minor
> Attachments: SLING-2938-api.patch, console.jpg
>
>
> Following up on an idea that Olaf Otto presented at CQCon last week, I've 
> been working on an @AdapterMethod annotation that makes it easier to create 
> Sling adapters, as in
>   @Component
>   @Service
>   public class MyAdapters implements AdapterMethodProvider {
> @AdapterMethod
> public Bar toBar(Foo f) { ... adapt Foo to Bar ... }
>   }
> As this requires changes to the sling.api bundle, I'll commit to my 
> whiteboard first, for review



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


[jira] [Closed] (SLING-9844) JCR ContentLoader - Import Breaks on Complex Node Structures

2020-11-06 Thread Dan Klco (Jira)


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

Dan Klco closed SLING-9844.
---

> JCR ContentLoader - Import Breaks on Complex Node Structures
> 
>
> Key: SLING-9844
> URL: https://issues.apache.org/jira/browse/SLING-9844
> Project: Sling
>  Issue Type: Bug
>Affects Versions: JCR ContentLoader 2.4.0
>Reporter: Dan Klco
>Assignee: Dan Klco
>Priority: Major
> Fix For: JCR ContentLoader 2.4.0
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The save in the finishNode method causes issues on complex node types (e.g. 
> when child nodes are required). This is exhibited in Oak Index's which fail 
> with the following (deceptive) exception:
> {{20.10.2020 21:33:20.958 *ERROR* [Apache Sling Repository Startup Thread #1] 
> org.apache.sling.jcr.contentloader.internal.BundleContentLoader Cannot load 
> initial content for bundle org.apache.sling.cms.ui : This builder is 
> read-only.
> javax.jcr.RepositoryException: This builder is read-only.
>   at 
> org.apache.sling.jcr.contentloader.internal.BundleContentLoader.createNode(BundleContentLoader.java:503)
>  [org.apache.sling.jcr.contentloader:2.4.0.SNAPSHOT]
>   at 
> org.apache.sling.jcr.contentloader.internal.BundleContentLoader.handleFile(BundleContentLoader.java:427)
>  [org.apache.sling.jcr.contentloader:2.4.0.SNAPSHOT]}}
> After tracing through the code, I found this is where it was attempting to 
> add the indexRules child node. Also, when you have a required standard child 
> node where the operation will fail indicating the missing child node. 
> [~jeb] -- Looks like you made the change here, any concerns with removing 
> this save? It seems to also save at the path level.
> https://github.com/apache/sling-org-apache-sling-jcr-contentloader/commit/e1509c5c4c73bbade952a118e04cb645c36aa5da



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


[jira] [Closed] (SLING-9736) use content loader health check component to make the integration tests more stable

2020-11-06 Thread Dan Klco (Jira)


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

Dan Klco closed SLING-9736.
---

> use content loader health check component to make the integration tests more 
> stable
> ---
>
> Key: SLING-9736
> URL: https://issues.apache.org/jira/browse/SLING-9736
> Project: Sling
>  Issue Type: Sub-task
>Reporter: Eric Norman
>Assignee: Eric Norman
>Priority: Major
> Fix For: JCR ContentLoader 2.4.0
>
>
> The integration tests for the o.a.s.jcr.contentloader build fail on a regular 
> basis from what appears to be a condition where the assertions are running 
> before the bundle content has finished loading
> Use the health check component to check and wait for the bundle content 
> loading to be completed before processing each test.



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


[jira] [Closed] (SLING-9841) JCR Content Loader Configure Skip Paths

2020-11-06 Thread Dan Klco (Jira)


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

Dan Klco closed SLING-9841.
---

> JCR Content Loader Configure Skip Paths
> ---
>
> Key: SLING-9841
> URL: https://issues.apache.org/jira/browse/SLING-9841
> Project: Sling
>  Issue Type: Improvement
>Affects Versions: JCR ContentLoader 2.3.0
>Reporter: Dan Klco
>Assignee: Dan Klco
>Priority: Major
> Fix For: JCR ContentLoader 2.4.0
>
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> As a developer, I want to be able to set a directive in a path entry to skip 
> the loading of the path entry when the value for a certain instance states. 
> This should be implemented as an OSGi configuration with two properties which 
> take an array of regular expression strings:
> -includedTargets - target paths which will be included 
> -excludedTargets - target paths which will be excluded, takes precidence
> If not specified, the bundle loader should still start and load all content 
> targets.



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


[jira] [Closed] (SLING-8041) Inline kxml2 in the JCR Contentloader

2020-11-06 Thread Dan Klco (Jira)


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

Dan Klco closed SLING-8041.
---

> Inline kxml2 in the JCR Contentloader
> -
>
> Key: SLING-8041
> URL: https://issues.apache.org/jira/browse/SLING-8041
> Project: Sling
>  Issue Type: Improvement
>  Components: JCR
>Affects Versions: JCR ContentLoader 2.2.6
>Reporter: Karl Pauls
>Priority: Minor
> Fix For: JCR ContentLoader 2.4.0
>
>
> It would be nice if we could inline the embedded kxml2 jar in the 
> contentloader to avoid extracting it into the framework cache.



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


[jira] [Closed] (SLING-9734) Add a health check component that monitors bundle content loading

2020-11-06 Thread Dan Klco (Jira)


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

Dan Klco closed SLING-9734.
---

> Add a health check component that monitors bundle content loading
> -
>
> Key: SLING-9734
> URL: https://issues.apache.org/jira/browse/SLING-9734
> Project: Sling
>  Issue Type: Improvement
>Reporter: Eric Norman
>Assignee: Eric Norman
>Priority: Major
> Fix For: JCR ContentLoader 2.4.0
>
>
> Add a new health check component that monitors the bundle content loading 
> progress for all of the applicable deployed bundles.
> This can be used to do a quick check for bundles that fail content loading, 
> or as a way to query the system to check if the content loading has completed.



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


[jira] [Closed] (SLING-9735) Remove loginAdministrative() usage from org.apache.sling.jcr.contentloader

2020-11-06 Thread Dan Klco (Jira)


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

Dan Klco closed SLING-9735.
---

> Remove loginAdministrative() usage from org.apache.sling.jcr.contentloader
> --
>
> Key: SLING-9735
> URL: https://issues.apache.org/jira/browse/SLING-9735
> Project: Sling
>  Issue Type: Improvement
>Reporter: Eric Norman
>Assignee: Eric Norman
>Priority: Major
> Fix For: JCR ContentLoader 2.4.0
>
>
> Create a service user and replace usage of loginAdministrative()  to use that 
> service user.
>  
> Counted 4 occurrences in the current source code.



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


[jira] [Closed] (SLING-9748) Update to Sling Bundle Parent 39

2020-11-06 Thread Dan Klco (Jira)


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

Dan Klco closed SLING-9748.
---

> Update to Sling Bundle Parent 39
> 
>
> Key: SLING-9748
> URL: https://issues.apache.org/jira/browse/SLING-9748
> Project: Sling
>  Issue Type: Task
>  Components: JCR
>Reporter: Eric Norman
>Assignee: Eric Norman
>Priority: Major
> Fix For: JCR ContentLoader 2.4.0
>
>
> Update to Sling Bundle Parent 39



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


[jira] [Closed] (SLING-9733) Refactor o.a.s.jcr.contentloader tests to make them work with java 11

2020-11-06 Thread Dan Klco (Jira)


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

Dan Klco closed SLING-9733.
---

> Refactor o.a.s.jcr.contentloader tests to make them work with java 11
> -
>
> Key: SLING-9733
> URL: https://issues.apache.org/jira/browse/SLING-9733
> Project: Sling
>  Issue Type: Sub-task
>Reporter: Eric Norman
>Assignee: Eric Norman
>Priority: Major
> Fix For: JCR ContentLoader 2.4.0
>
>
> The JCR ContentLoader unit tests don't work when using java 11.
> Fix by refactoring using the guidance from SLING-7166



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


[jira] [Closed] (SLING-8515) Make Pax Exam testing compliant with Java 9 and higher

2020-11-06 Thread Dan Klco (Jira)


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

Dan Klco closed SLING-8515.
---

> Make Pax Exam testing compliant with Java 9 and higher
> --
>
> Key: SLING-8515
> URL: https://issues.apache.org/jira/browse/SLING-8515
> Project: Sling
>  Issue Type: Task
>  Components: JCR
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
>Priority: Major
> Fix For: JCR ContentLoader 2.4.0
>
>
> * Use Sling Bundle Parent 35
> * Update Pax Exam to 4.13.1
> * Update Testing PaxExam to 3.0.0
> * Update Felix Framework to 6.0.3



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


[jira] [Closed] (SLING-9272) Update Pax Exam to 4.13.3

2020-11-06 Thread Dan Klco (Jira)


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

Dan Klco closed SLING-9272.
---

> Update Pax Exam to 4.13.3
> -
>
> Key: SLING-9272
> URL: https://issues.apache.org/jira/browse/SLING-9272
> Project: Sling
>  Issue Type: Task
>  Components: JCR
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
>Priority: Major
> Fix For: JCR ContentLoader 2.4.0
>
>




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


[jira] [Closed] (SLING-7923) Simplify integration tests

2020-11-06 Thread Dan Klco (Jira)


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

Dan Klco closed SLING-7923.
---

> Simplify integration tests
> --
>
> Key: SLING-7923
> URL: https://issues.apache.org/jira/browse/SLING-7923
> Project: Sling
>  Issue Type: Improvement
>  Components: JCR
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
>Priority: Major
> Fix For: JCR ContentLoader 2.4.0
>
>
> * remove boilerplate code and use Testing PaxExam instead
> * use Sling Parent 34 and bnd Maven plugins
> * make initial content bundle an option
> * use resource presence to wait for installed content



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


[jira] [Closed] (SLING-9107) Update Pax Exam to 4.13.2

2020-11-06 Thread Dan Klco (Jira)


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

Dan Klco closed SLING-9107.
---

> Update Pax Exam to 4.13.2
> -
>
> Key: SLING-9107
> URL: https://issues.apache.org/jira/browse/SLING-9107
> Project: Sling
>  Issue Type: Task
>  Components: JCR
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
>Priority: Major
> Fix For: JCR ContentLoader 2.4.0
>
>




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


[jira] [Closed] (SLING-9271) Update to Sling Bundle Parent 38

2020-11-06 Thread Dan Klco (Jira)


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

Dan Klco closed SLING-9271.
---

> Update to Sling Bundle Parent 38
> 
>
> Key: SLING-9271
> URL: https://issues.apache.org/jira/browse/SLING-9271
> Project: Sling
>  Issue Type: Task
>  Components: JCR
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
>Priority: Major
> Fix For: JCR ContentLoader 2.4.0
>
>




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


[jira] [Closed] (SLING-8243) Content Loader - support merge of properties and child nodes

2020-11-06 Thread Dan Klco (Jira)


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

Dan Klco closed SLING-8243.
---

> Content Loader - support merge of properties and child nodes
> 
>
> Key: SLING-8243
> URL: https://issues.apache.org/jira/browse/SLING-8243
> Project: Sling
>  Issue Type: New Feature
>Reporter: Jason E Bailey
>Assignee: Jason E Bailey
>Priority: Major
> Fix For: JCR ContentLoader 2.4.0
>
>
> Currently the Content Loader doesn't support a merge feature, a merge feature 
> would provide the ability for the an import to update existing properties and 
> nodes, and additionally delete the specific properties and nodes that aren't 
> imported.



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


[GitHub] [sling-org-apache-sling-adapter-annotations] bdelacretaz edited a comment on pull request #1: SLING-2938 - move integration tests here, using invoker plugin

2020-11-06 Thread GitBox


bdelacretaz edited a comment on pull request #1:
URL: 
https://github.com/apache/sling-org-apache-sling-adapter-annotations/pull/1#issuecomment-723166483


   The build checks have failed due to
   
   > [INFO] [ERROR] org.apache.sling.adapter.annotations.AdapterRegistrationIT  
Time elapsed: 63.218 s  <<< ERROR!
   > [INFO] java.util.concurrent.TimeoutException: Call failed to return true 
in 6 ms. Last exception was: null
   
   I've seen this sporadically when running tests, it looks like the Sling 
instance setup does not work every time. 
   
   Looks like that might be https://issues.apache.org/jira/browse/SLING-8080 as 
mentioned by Konrad at https://issues.apache.org/jira/browse/SLING-2938
   
   _Update: I have committed a (hopeful) workaround for SLING-8080 to the PR, 
by explicitly adding the artifact versions in it-model.txt_



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-2938) AdapterMethods annotation and adapter proxy service

2020-11-06 Thread Bertrand Delacretaz (Jira)


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

Bertrand Delacretaz commented on SLING-2938:


I have committed a (hopeful) workaround for SLING-8080 to the PR, by explicitly 
adding the artifact versions in it-model.txt

> AdapterMethods annotation and adapter proxy service
> ---
>
> Key: SLING-2938
> URL: https://issues.apache.org/jira/browse/SLING-2938
> Project: Sling
>  Issue Type: Bug
>  Components: Engine, Extensions
>Affects Versions: Adapter 2.1.0
>Reporter: Bertrand Delacretaz
>Priority: Minor
> Attachments: SLING-2938-api.patch, console.jpg
>
>
> Following up on an idea that Olaf Otto presented at CQCon last week, I've 
> been working on an @AdapterMethod annotation that makes it easier to create 
> Sling adapters, as in
>   @Component
>   @Service
>   public class MyAdapters implements AdapterMethodProvider {
> @AdapterMethod
> public Bar toBar(Foo f) { ... adapt Foo to Bar ... }
>   }
> As this requires changes to the sling.api bundle, I'll commit to my 
> whiteboard first, for review



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


[GitHub] [sling-org-apache-sling-adapter-annotations] sonarcloud[bot] commented on pull request #1: SLING-2938 - move integration tests here, using invoker plugin

2020-11-06 Thread GitBox


sonarcloud[bot] commented on pull request #1:
URL: 
https://github.com/apache/sling-org-apache-sling-adapter-annotations/pull/1#issuecomment-723172163


   Kudos, SonarCloud Quality Gate passed!
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-adapter-annotations=1=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-adapter-annotations=1=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-adapter-annotations=1=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-adapter-annotations=1=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-adapter-annotations=1=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-adapter-annotations=1=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-adapter-annotations
 t=1=false=SECURITY_HOTSPOT) [0 Security 
Hotspots](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-adapter-annotations=1=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-adapter-annotations=1=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-adapter-annotations=1=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-adapter-annotations=1=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-adapter-annotations=1)
 No Coverage information  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-adapter-annotations=1=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-adapter-annotations=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 
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-adapter-annotations] bdelacretaz edited a comment on pull request #1: SLING-2938 - move integration tests here, using invoker plugin

2020-11-06 Thread GitBox


bdelacretaz edited a comment on pull request #1:
URL: 
https://github.com/apache/sling-org-apache-sling-adapter-annotations/pull/1#issuecomment-723166483


   The build checks have failed due to
   
   > [INFO] [ERROR] org.apache.sling.adapter.annotations.AdapterRegistrationIT  
Time elapsed: 63.218 s  <<< ERROR!
   > [INFO] java.util.concurrent.TimeoutException: Call failed to return true 
in 6 ms. Last exception was: null
   
   I've seen this sporadically when running tests, it looks like the Sling 
instance setup does not work every time. 
   
   Looks like that might be https://issues.apache.org/jira/browse/SLING-8080 as 
mentioned by Konrad at https://issues.apache.org/jira/browse/SLING-2938



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-adapter-annotations] bdelacretaz commented on pull request #1: SLING-2938 - move integration tests here, using invoker plugin

2020-11-06 Thread GitBox


bdelacretaz commented on pull request #1:
URL: 
https://github.com/apache/sling-org-apache-sling-adapter-annotations/pull/1#issuecomment-723166483


   The build checks have failed due to
   
   > [INFO] [ERROR] org.apache.sling.adapter.annotations.AdapterRegistrationIT  
Time elapsed: 63.218 s  <<< ERROR!
   > [INFO] java.util.concurrent.TimeoutException: Call failed to return true 
in 6 ms. Last exception was: null
   
   I've seen this sporadically when running tests, it looks like the Sling 
instance setup does not work every time.



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 Content Package Archetype 1.0.0

2020-11-06 Thread Konrad Windszus
Sorry I haven't checked the code up till now.
Some questions/remarks:

1. Why filevault-package-maven-plugin 1.1.2 and not the latest version 1.1.4?
2. It is using a mixed package (mutable/potentially immutable content), why do 
we propose that instead of a clear separation with three different modules 
(apps. content, container)
3. I would recommend setting a dedicated package type in the configuration 
(https://github.com/apache/sling-content-package-archetype/blob/30380a1d75abfaafa1aa67d487f01b3123575777/src/main/resources/archetype-resources/pom.xml#L49
 
)
4. Would it make sense to embed a bundle here as well?
5. As archetypes don't allow speaking description for properties these either 
need a documentation and/or a very speaking name. IMHO shortName 
(https://github.com/apache/sling-content-package-archetype/blob/30380a1d75abfaafa1aa67d487f01b3123575777/src/main/resources/META-INF/maven/archetype-metadata.xml#L39
 
)
 is not good enough, given that there is not a readme

Thanks and sorry for the late feedback,
Konrad

> On 6. Nov 2020, at 13:18, Robert Munteanu  wrote:
> 
> Hi,
> 
> This is a first release of the tooling, so no issues fixed (but a
> version was created):
> https://issues.apache.org/jira/browse/SLING/fixforversion/12349357
> 
> Staging repository:
> https://repository.apache.org/content/repositories/orgapachesling-2369/
> 
> 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 2369 /tmp/sling-staging
> 
> Please vote to approve this release:
> 
>  [ ] +1 Approve the release
>  [ ]  0 Don't care
>  [ ] -1 Don't release, because ...
> 
> This majority vote is open for at least 72 hours.
> 
> Regards,
> Robert Munteanu
> 



Re: [VOTE] Release Apache Sling Content Package Archetype 1.0.0

2020-11-06 Thread Robert Munteanu
On Fri, 2020-11-06 at 07:24 -0800, Ruben Reusser wrote:
> Robert,
> 
> On 11/6/2020 6:07 AM, Robert Munteanu wrote:
> > Hi Ruben and thanks for looking into this.
> > 
> > On Fri, 2020-11-06 at 05:36 -0800, Ruben Reusser wrote:
> > > Robert,
> > > 
> > > had a quick look at this archetype - for a 1.0.0 release I am
> > > missing
> > > documentation around this archetype.
> > What kind of documentation are you looking for? The archetype is
> > referenced at [2], but nowhere else I guess. I find it simple and
> > self-
> > explanatory, but would be happy to add more information.
> 
> I was hoping for something along the lines of the readme in the
> project 
> archetype [3]

Thanks, added https://issues.apache.org/jira/browse/SLING-9882 .

> 
> > > I am also curious if the Java Use Object it creates in apps is
> > > really
> > > a
> > > good idea? After all, this is just a content archetype.
> > The idea behind the archetype was to allow users to quickly
> > generate a
> > content package. They are free to adjust it how they see fit
> > afterwards, e.g. by removing rendering scripts.
> > 
> > Generally, I think it's more useful to bake more stuff in the
> > archetype
> > and allow users to remove it, rather than give them too many
> > options or
> > very 'slim' archetypes. And it makes maintenance for us much
> > easier.
> I totally understand the idea behind why to put a simple html
> component 
> into the content package. I however struggle with the fact that Java
> Use 
> Objects are probably not a best practice for sling projects or other 
> upstream projects. Maybe I am wrong here.

I'm not saying you're wrong, I am not an expert in HTL. I added an use
objects since I usually found it problematic to properly create one.
What would say are best practices in this context?

Thanks,
Robert



[jira] [Created] (SLING-9882) Add more information about the project in the README

2020-11-06 Thread Robert Munteanu (Jira)
Robert Munteanu created SLING-9882:
--

 Summary: Add more information about the project in the README
 Key: SLING-9882
 URL: https://issues.apache.org/jira/browse/SLING-9882
 Project: Sling
  Issue Type: Task
  Components: Maven Plugins and Archetypes
Reporter: Robert Munteanu
 Fix For: Content Package Archetype 1.0.2


[~reusr1] points out that we could use some more documentation in 
sling-content-package-archetype, see for example 
https://github.com/apache/sling-project-archetype/blob/master/README.md .



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


[GitHub] [sling-org-apache-sling-resourceresolver] rombert commented on a change in pull request #24: SLING-9535_-Improve performance of sling:alias

2020-11-06 Thread GitBox


rombert commented on a change in pull request #24:
URL: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/24#discussion_r518827596



##
File path: 
src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryConfig.java
##
@@ -149,6 +149,12 @@
  " and on the alias update time if the number of aliases 
is huge (over 1).")
 boolean resource_resolver_optimize_alias_resolution() default true;
 
+@AttributeDefinition(name = "Allowed Optimize alias path",
+ description = "This setting can contain a list of path prefixes, e.g. 
/libs/, /content/. If " +
+ "such a list is configured, for alias optimization, only 
paths from resources starting with this prefix " +
+ "are considered. If the list is empty, all paths are used.)")
+String[] resource_resolver_optimize_alias_allowedlist();

Review comment:
   I would say that since we started discussing about 
https://cwiki.apache.org/confluence/display/SLING/Removal+of+problematic+language
 we should not add any more problematic terms like whitelist.





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 Content Package Archetype 1.0.0

2020-11-06 Thread Ruben Reusser

Robert,

On 11/6/2020 6:07 AM, Robert Munteanu wrote:

Hi Ruben and thanks for looking into this.

On Fri, 2020-11-06 at 05:36 -0800, Ruben Reusser wrote:

Robert,

had a quick look at this archetype - for a 1.0.0 release I am
missing
documentation around this archetype.

What kind of documentation are you looking for? The archetype is
referenced at [2], but nowhere else I guess. I find it simple and self-
explanatory, but would be happy to add more information.


I was hoping for something along the lines of the readme in the project 
archetype [3]



I am also curious if the Java Use Object it creates in apps is really
a
good idea? After all, this is just a content archetype.

The idea behind the archetype was to allow users to quickly generate a
content package. They are free to adjust it how they see fit
afterwards, e.g. by removing rendering scripts.

Generally, I think it's more useful to bake more stuff in the archetype
and allow users to remove it, rather than give them too many options or
very 'slim' archetypes. And it makes maintenance for us much easier.
I totally understand the idea behind why to put a simple html component 
into the content package. I however struggle with the fact that Java Use 
Objects are probably not a best practice for sling projects or other 
upstream projects. Maybe I am wrong here.

looking at the sling-package-archetype at [1] you also decided to
not
use a profile for the package installation - not sure if it would be
better to follow  similar pattern in both archetypes

Right, that should be adjusted. I started with my personal perference
and forgot to to switch to the profile. Can you please file a Sling
issue so it is fixed for the next version?


will do. Looks like the documentation is a bit out of sync as well on 
this topic (project archetype readme vs docs)



Thanks,
Robert

[2]: 
https://sling.apache.org/documentation/development/content-packages.html#maven-projects-1


Ruben

[1]
https://github.com/apache/sling-project-archetype/blob/master/src/main/resources/archetype-resources/README.NotAll.md


[3] https://github.com/apache/sling-project-archetype/blob/master/README.md




[GitHub] [sling-org-apache-sling-resourceresolver] akankshajain18 commented on a change in pull request #24: SLING-9535_-Improve performance of sling:alias

2020-11-06 Thread GitBox


akankshajain18 commented on a change in pull request #24:
URL: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/24#discussion_r518799163



##
File path: 
src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java
##
@@ -304,6 +312,25 @@ protected void activate(final BundleContext bundleContext, 
final ResourceResolve
 this.observationPaths[i] = new Path(paths[i]);
 }
 
+// optimize alias path allow list
+this.aliasPathAllowList = null;

Review comment:
   As per my understanding, Null is set in the activate method before 
populating "aliasPathAllowList" to avoid any overlap. Since we are loading this 
variable using the configured paths, it can not be set null at the end





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-resourceresolver] sonarcloud[bot] commented on pull request #26: Sling 9535 dummy

2020-11-06 Thread GitBox


sonarcloud[bot] commented on pull request #26:
URL: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/26#issuecomment-723119309


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=26=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=26=false=BUG)
 [1 
Bug](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=26=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=26=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=26=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=26=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=26
 lved=false=SECURITY_HOTSPOT) [0 Security 
Hotspots](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=26=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=26=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=26=false=CODE_SMELL)
 [3 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=26=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-resourceresolver=26=new_coverage=list)
 [90.9% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-resourceresolver=26=new_coverage=list)
  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-resourceresolver=26=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-resourceresolver=26=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 
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-resourceresolver] jsedding commented on a change in pull request #24: SLING-9535_-Improve performance of sling:alias

2020-11-06 Thread GitBox


jsedding commented on a change in pull request #24:
URL: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/24#discussion_r518791275



##
File path: 
src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java
##
@@ -304,6 +312,25 @@ protected void activate(final BundleContext bundleContext, 
final ResourceResolve
 this.observationPaths[i] = new Path(paths[i]);
 }
 
+// optimize alias path allow list
+this.aliasPathAllowList = null;

Review comment:
   +1 - either compute the new data-structure and swap it out with a single 
assingment, or use a concurrent data-structure that could be updated 
incrementally. I would prefer the former, as it reflects the atomic nature of a 
config update better.

##
File path: 
src/main/java/org/apache/sling/resourceresolver/impl/CommonResourceResolverFactoryImpl.java
##
@@ -472,6 +473,22 @@ public boolean hasVanityPathPrecedence() {
 return configs;
 }
 
+@Override
+public List getAliasPath() {
+final AtomicReferenceArray includes = 
this.activator.getOptimizedAliasResolutionAllowList();
+if (includes == null) {
+return Collections.emptyList();
+}
+
+final List configs = new ArrayList<>();

Review comment:
   I recommend using a `TreeSet`. It provides sorting and eliminates 
duplicates. Also, I would avoid manual iteration. Instead if 
`this.activator.getOptimizedAliasResolutionAllowList()` returns a `String[]` 
you could write `new TreeSet<>(Arrays.asList(includes))`; or if it returns a 
`Collection` you could just copy it into a `TreeSet` using the constructor.

##
File path: 
src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryConfig.java
##
@@ -149,6 +149,12 @@
  " and on the alias update time if the number of aliases 
is huge (over 1).")
 boolean resource_resolver_optimize_alias_resolution() default true;
 
+@AttributeDefinition(name = "Allowed Optimize alias path",
+ description = "This setting can contain a list of path prefixes, e.g. 
/libs/, /content/. If " +
+ "such a list is configured, for alias optimization, only 
paths from resources starting with this prefix " +
+ "are considered. If the list is empty, all paths are used.)")
+String[] resource_resolver_optimize_alias_allowedlist();

Review comment:
   The equivalent property for vanity paths is called 
`resource_resolver_vanitypath_whitelist`. For consistency's sake I think this 
should be called `resource_resolver_alias_whitelist` or maybe slightly more 
descriptive `resource_resolver_alias_location_whitelist`.

##
File path: 
src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java
##
@@ -128,6 +129,9 @@
 
 private volatile ResourceResolverFactoryConfig config = DEFAULT_CONFIG;
 
+/** Alias path whitelist */
+private AtomicReferenceArray aliasPathAllowList;

Review comment:
   I strongly agree with @rombert. `AtomicReferenceArray` is not the 
correct data-structure for how you use it. It allows atomic updates to 
individual array entries, but not for the entire array. You need an atomic 
update of the entire array (or collection). Indeed, you reassign this field 
later, which is not thread-safe because the field is not volatile.
   
   If you want to atomically swap out the entire configuration, you need a 
volatile field and make a local copy of the field before you work with it. Or 
you use a thread-safe data-structure, like e.g. `CopyOnWriteArrayList` as 
Robert suggests.

##
File path: 
src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
##
@@ -1047,13 +1047,40 @@ private boolean addEntry(final Map> entryMap, final Strin
 return map;
 }
 
-   /**
+private boolean isValidAliasPath(final String path){
+if (path == null) {
+throw new IllegalArgumentException("Unexpected null path");
+}
+
+  // ignore system tree
+  if (path.startsWith(JCR_SYSTEM_PREFIX)) {
+log.debug("loadAliases: Ignoring {}", path);
+return false;
+  }
+
+// check white list
+if ( this.factory.getAliasPath() != null && 
!this.factory.getAliasPath().isEmpty()) {
+boolean allowed = false;
+for(final String prefix : this.factory.getAliasPath()) {

Review comment:
   Nit: this could be much nicer with streams:
   
   `boolean allowed = 
this.factory.getAliasPath().stream().anyMatch(path::startsWith)`
   
   (Disclaimer: the above was typed in this comment box, so most likely an 
error is hiding somewhere)

##
File path: 
src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapConfigurationProvider.java
##
@@ -78,4 +78,6 @@ public int 

[GitHub] [sling-org-apache-sling-resourceresolver] akankshajain18 opened a new pull request #26: Sling 9535 dummy

2020-11-06 Thread GitBox


akankshajain18 opened a new pull request #26:
URL: https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/26


   



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 Content Package Archetype 1.0.0

2020-11-06 Thread Robert Munteanu
Hi Ruben and thanks for looking into this.

On Fri, 2020-11-06 at 05:36 -0800, Ruben Reusser wrote:
> Robert,
> 
> had a quick look at this archetype - for a 1.0.0 release I am
> missing 
> documentation around this archetype.

What kind of documentation are you looking for? The archetype is
referenced at [2], but nowhere else I guess. I find it simple and self-
explanatory, but would be happy to add more information.

> 
> I am also curious if the Java Use Object it creates in apps is really
> a 
> good idea? After all, this is just a content archetype.

The idea behind the archetype was to allow users to quickly generate a
content package. They are free to adjust it how they see fit
afterwards, e.g. by removing rendering scripts.

Generally, I think it's more useful to bake more stuff in the archetype
and allow users to remove it, rather than give them too many options or
very 'slim' archetypes. And it makes maintenance for us much easier.

> 
> looking at the sling-package-archetype at [1] you also decided to
> not 
> use a profile for the package installation - not sure if it would be 
> better to follow  similar pattern in both archetypes

Right, that should be adjusted. I started with my personal perference
and forgot to to switch to the profile. Can you please file a Sling
issue so it is fixed for the next version?

Thanks,
Robert

[2]: 
https://sling.apache.org/documentation/development/content-packages.html#maven-projects-1

> 
> Ruben
> 
> [1] 
> https://github.com/apache/sling-project-archetype/blob/master/src/main/resources/archetype-resources/README.NotAll.md
> 
> On 11/6/2020 4:18 AM, Robert Munteanu wrote:
> > Hi,
> > 
> > This is a first release of the tooling, so no issues fixed (but a
> > version was created):
> > https://issues.apache.org/jira/browse/SLING/fixforversion/12349357
> > 
> > Staging repository:
> > https://repository.apache.org/content/repositories/orgapachesling-2369/
> > 
> > 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 2369 /tmp/sling-staging
> > 
> > Please vote to approve this release:
> > 
> >[ ] +1 Approve the release
> >[ ]  0 Don't care
> >[ ] -1 Don't release, because ...
> > 
> > This majority vote is open for at least 72 hours.
> > 
> > Regards,
> > Robert Munteanu
> > 



Re: [roundtable] Sling 12 + future release process

2020-11-06 Thread Robert Munteanu
Hi,

On Fri, 2020-10-16 at 15:30 -0400, Daniel Klco wrote:
> I think there's still value in producing a runnable JAR, even if
> under the
> hood it's using the Feature Model, especially for people just getting
> into
> Sling.
> 
> For the dynamic option, what if instead of creating some sort of
> website to
> produce artifacts, we had a Docker image that would take one or more
> Maven
> coordinates as parameters, download the features and then use the
> Sling
> Feature Launcher to launch an instance using the features. We could
> create
> a webpage / webform to allow users to search for valid coordinates
> and show
> them the command to execute.

The website to produce artifacts would create a Maven project, ready to
import into an IDE and start work with.

If I understand your proposal, the Docker launcher approach would allow
users to create an application to launch but not a project. Is that
correct?

> 
> The other thing that I'd relate to this is that the Starter with a
> single
> project wrapping multiple features is not ideal. Instead, every
> feature
> should be a separate project (or at least be able to be released
> separately) with a sane set of configurations so that a consumer
> could
> import an updated version of the feature when the underlying bundle
> is
> updated rather than having to wait until Starter is released or fork
> and
> sync like I'm doing with the CMS. This does mean some additional
> release
> work where we'd have to update the feature models and release along
> with
> bundle updates, but it would make it easier on downstream projects to
> use
> features of Sling in a granular way.
> 
> In this model, both the Docker Image and Sling Starter are consumers
> of
> these base features.

I've seen this idea floated around a couple of times. I think it has
merit and to make it happen we need to a) make sure the features are
flexible enough and b) it does not burden development too much.

Regarding a), I think the of current starter has two main parts:

- a list of the latest bundles that work together
- a set of configurations + repoinit statements that are working and
reasonable

I think mostly everyone will want to use the latest modules that we
validated, and overrrides are easily done using the feature model [0].

If we split the features to individual modules and advertise them as
reusable then we also need to ensure that various configurations and
repoinit statements can be overridden/removed. For instance, some
installations may wish to give fewer permissions to the sling-package-
install user [1] or adjust the service unavailable filter [2].

Another idea would be that each feature would publish two artifacts:

- bundle list
- default configs

And a project can either accept the default configs completely or
create their own.

Feature grouping is something that we should also take into account. If
a user wants to remove the web console completely, or the OSGi
installer, how easy would that be?

It's actually b) that I think needs the most discussion. How often
would you see the features themselves released?

If we plan to release them with each bundle that's an extra burden for
the one doing the releases. But if we don't release them every time
then the Starter would drift or get back to using snapshot versions. I
think both of these should be avoided.

Thanks,
Robert

[0]: 
https://github.com/apache/sling-org-apache-sling-feature/blob/master/docs/features.md#prototype
[1]: 
https://github.com/apache/sling-org-apache-sling-starter/blob/5e8f7bb00afbab065c307bd68ee80fbedb00d76a/src/main/features/base-repoinit.txt#L52-L58
[2]: 
https://github.com/apache/sling-org-apache-sling-starter/blob/5e8f7bb00afbab065c307bd68ee80fbedb00d76a/src/main/features/healthcheck.json#L80-L99


> 
> Thoughts?
> 
> 
> 
> 
> 
> On Thu, Oct 15, 2020 at 12:14 PM Robert Munteanu 
> wrote:
> 
> > On Fri, 2020-10-02 at 07:36 +, Stefan Seifert wrote:
> > > the discussion then did go further whether we should rethink the
> > > way
> > > of doing sling releases in the future:
> > > 
> > > - should we still perform releases this way?
> > > 
> > > - JavaDoc generation should be decoupled from our annual
> > > releases,
> > > should be done automatically and updated for each module release
> > > 
> > > - probably we could just do with "snapshot releases" / "nightly
> > > builds" - and vote from time to time to make an official release
> > > out
> > > of it?
> > > 
> > > - Should we replace the Sling Starter release with a "release
> > > generator" web page that allows the user to download a project?
> > > For
> > > instance:
> > > 
> > > Scripting: [ ] jsp, [ ] htl, [ ] freemarker, [ ]
> > > thymeleaf
> > > 
> > > Discovery: [ ] standalone, [ ] oak
> > > 
> > > Persistence: [ ] Tar, [ ] MongoDB
> > > 
> > > Launcher: [ ] feature model, [ ] karaf
> > > 
> > > - We have two launcher alternatives - Feature Launcher,
> > > Kickstarter.
> > > We should only keep one.
> > 
> > To 

[jira] [Commented] (SLING-2938) AdapterMethods annotation and adapter proxy service

2020-11-06 Thread Bertrand Delacretaz (Jira)


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

Bertrand Delacretaz commented on SLING-2938:


bq. would it be possible to already create a release in advance? 

I'd like to merge the above PR1 if people agree, and we might then release the 
adapter-annotations module and drop the adapter-annotations-it module.

I don't think SLING-9839 will be a problem in this case, at least not right 
now, as the adapter-annotations build passes, with just a warning from Sonar 
about jdk8.

> AdapterMethods annotation and adapter proxy service
> ---
>
> Key: SLING-2938
> URL: https://issues.apache.org/jira/browse/SLING-2938
> Project: Sling
>  Issue Type: Bug
>  Components: Engine, Extensions
>Affects Versions: Adapter 2.1.0
>Reporter: Bertrand Delacretaz
>Priority: Minor
> Attachments: SLING-2938-api.patch, console.jpg
>
>
> Following up on an idea that Olaf Otto presented at CQCon last week, I've 
> been working on an @AdapterMethod annotation that makes it easier to create 
> Sling adapters, as in
>   @Component
>   @Service
>   public class MyAdapters implements AdapterMethodProvider {
> @AdapterMethod
> public Bar toBar(Foo f) { ... adapt Foo to Bar ... }
>   }
> As this requires changes to the sling.api bundle, I'll commit to my 
> whiteboard first, for review



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


Re: [VOTE] Release Apache Sling Content Package Archetype 1.0.0

2020-11-06 Thread Ruben Reusser

Robert,

had a quick look at this archetype - for a 1.0.0 release I am missing 
documentation around this archetype.


I am also curious if the Java Use Object it creates in apps is really a 
good idea? After all, this is just a content archetype.


looking at the sling-package-archetype at [1] you also decided to not 
use a profile for the package installation - not sure if it would be 
better to follow  similar pattern in both archetypes


Ruben

[1] 
https://github.com/apache/sling-project-archetype/blob/master/src/main/resources/archetype-resources/README.NotAll.md


On 11/6/2020 4:18 AM, Robert Munteanu wrote:

Hi,

This is a first release of the tooling, so no issues fixed (but a
version was created):
https://issues.apache.org/jira/browse/SLING/fixforversion/12349357

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

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 2369 /tmp/sling-staging

Please vote to approve this release:

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

This majority vote is open for at least 72 hours.

Regards,
Robert Munteanu



[jira] [Commented] (SLING-2938) AdapterMethods annotation and adapter proxy service

2020-11-06 Thread Bertrand Delacretaz (Jira)


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

Bertrand Delacretaz commented on SLING-2938:


I have tried moving the integration tests in the main module, running them with 
maven-invoker-plugin and I think that looks good, what do people think?

[https://github.com/apache/sling-org-apache-sling-adapter-annotations/pull/1/files]

Having the tests in the same repository provides quicker feedback when making 
changes, and with the invoker plugin they remain decoupled from the main code.

If we agree we can merge that PR and deprecate the annotations-it module.

> AdapterMethods annotation and adapter proxy service
> ---
>
> Key: SLING-2938
> URL: https://issues.apache.org/jira/browse/SLING-2938
> Project: Sling
>  Issue Type: Bug
>  Components: Engine, Extensions
>Affects Versions: Adapter 2.1.0
>Reporter: Bertrand Delacretaz
>Priority: Minor
> Attachments: SLING-2938-api.patch, console.jpg
>
>
> Following up on an idea that Olaf Otto presented at CQCon last week, I've 
> been working on an @AdapterMethod annotation that makes it easier to create 
> Sling adapters, as in
>   @Component
>   @Service
>   public class MyAdapters implements AdapterMethodProvider {
> @AdapterMethod
> public Bar toBar(Foo f) { ... adapt Foo to Bar ... }
>   }
> As this requires changes to the sling.api bundle, I'll commit to my 
> whiteboard first, for review



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


[jira] [Commented] (SLING-9535) Improve performance of sling:alias Query when Optimize alias resolution is activated

2020-11-06 Thread Robert Munteanu (Jira)


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

Robert Munteanu commented on SLING-9535:


[~akanksha88] - thanks for the PR! I made a first review, it would be good if 
someone else could look as well.

> Improve performance of sling:alias Query when Optimize alias resolution is 
> activated
> 
>
> Key: SLING-9535
> URL: https://issues.apache.org/jira/browse/SLING-9535
> Project: Sling
>  Issue Type: Improvement
>  Components: ResourceResolver
>Reporter: Leonardo Derks
>Priority: Major
> Attachments: image-2020-06-19-18-29-24-335.png, 
> image-2020-06-19-18-33-21-657.png
>
>
> Improve performance of sling:alias Query when Optimize alias resolution is 
> activated in the Resource Resolver Factory:
> !image-2020-06-19-18-29-24-335.png!
> By checking the logs at startup this query is executed:
> {noformat}
> (query=SELECT sling:alias FROM nt:base WHERE sling:alias IS NOT NULL, path=*, 
> property=[sling:alias=[is not null]]){noformat}
> *The part that will be good to improve is that the query is not executed for 
> path=*, instead a predefined set of locations is used.*
> (Something similar as it is for the Vanity Paths will be nice):
> !image-2020-06-19-18-33-21-657.png!
> Then if none fo these are configured then the query is executed with path=*.
>  
> In our project several versions are created per page and it turns out that 
> the sling:alias found under _/jcr:system/jcr:versionStorage_ are also 
> including in the query exceeding the 1 limit mentioned in the warning 
> message of the property:
> _This might have an impact on the startup time and on the alias update time 
> if the number of aliases is huge (over 1)_
>  
> We might have a different approach to solve our issue but did not want to 
> leave this topic in the air. Might be also a good improvement for others.
>  
> Thanks
>  



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


[RESULT] [VOTE] Release Apache Sling JCR ContentLoader version 2.4.0

2020-11-06 Thread Daniel Klco
Hi,

The vote has passed with the following result :

+1 (binding): Eric Norman, Robert Munteanu, Dan Klco
+1 (non binding): N/A

I will copy this release to the Sling dist directory and promote the
artifacts to the central Maven repository.


[GitHub] [sling-org-apache-sling-adapter-annotations] bdelacretaz opened a new pull request #1: SLING-2938 - move integration tests here, using invoker plugin

2020-11-06 Thread GitBox


bdelacretaz opened a new pull request #1:
URL: https://github.com/apache/sling-org-apache-sling-adapter-annotations/pull/1


   This PR uses maven-invoker-plugin to bring the integration tests in the same 
repository while keeping them isolated. I'll discuss at 
https://issues.apache.org/jira/browse/SLING-2938



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-resourceresolver] rombert commented on a change in pull request #24: SLING-9535_-Improve performance of sling:alias

2020-11-06 Thread GitBox


rombert commented on a change in pull request #24:
URL: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/24#discussion_r518739404



##
File path: 
src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryConfig.java
##
@@ -149,6 +149,12 @@
  " and on the alias update time if the number of aliases 
is huge (over 1).")
 boolean resource_resolver_optimize_alias_resolution() default true;
 
+@AttributeDefinition(name = "Allowed Optimize alias path",

Review comment:
   Nit: I think "Allowed optimized alias paths" communicated the intent 
better.

##
File path: 
src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java
##
@@ -128,6 +129,9 @@
 
 private volatile ResourceResolverFactoryConfig config = DEFAULT_CONFIG;
 
+/** Alias path whitelist */
+private AtomicReferenceArray aliasPathAllowList;

Review comment:
   I think it's simpler if you have a `volatile` list here and for thread 
safety either make them immutable , e.g. `Collections.unmodifiableList(...)` or 
use a thread-safe list like `CopyOnWriteArrayList`.

##
File path: 
src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
##
@@ -1047,13 +1047,40 @@ private boolean addEntry(final Map> entryMap, final Strin
 return map;
 }
 
-   /**
+private boolean isValidAliasPath(final String path){
+if (path == null) {
+throw new IllegalArgumentException("Unexpected null path");
+}
+
+  // ignore system tree
+  if (path.startsWith(JCR_SYSTEM_PREFIX)) {
+log.debug("loadAliases: Ignoring {}", path);
+return false;
+  }
+
+// check white list
+if ( this.factory.getAliasPath() != null && 
!this.factory.getAliasPath().isEmpty()) {

Review comment:
   getAliasPath() cannot return null, right?

##
File path: 
src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
##
@@ -1047,13 +1047,40 @@ private boolean addEntry(final Map> entryMap, final Strin
 return map;
 }
 
-   /**
+private boolean isValidAliasPath(final String path){

Review comment:
   Indentation looks inconsistent in this method, please check.

##
File path: 
src/test/java/org/apache/sling/resourceresolver/impl/mapping/MapEntriesTest.java
##
@@ -2074,4 +2102,28 @@ public void run() {
 }
 }
 }
+
+@Test
+public void testIsValidAliasPath() throws Exception {
+Method method = MapEntries.class.getDeclaredMethod("isValidAliasPath", 
String.class);
+method.setAccessible(true);
+
+// ignore system tree - path should not start with /jcr:system -
+assertFalse((Boolean)method.invoke(mapEntries, "/jcr:system/node"));
+//valid alias path
+assertTrue((Boolean)method.invoke(mapEntries, "/parent"));
+// notallowedparent is not valid configured alias path
+assertFalse((Boolean)method.invoke(mapEntries, "/notallowedparent"));
+}
+
+@Test
+public void testNullAliasPath() throws NoSuchMethodException, 
IllegalAccessException {

Review comment:
   This method does not fail if an exception is not thrown.  You probably 
want either `@Test(expected=...)` or to use the `ExpectedException` JUnit rule. 
I you remove the usage of reflection (see comment on previous method) you can 
use the first option.

##
File path: 
src/test/java/org/apache/sling/resourceresolver/impl/mapping/MapEntriesTest.java
##
@@ -2074,4 +2102,28 @@ public void run() {
 }
 }
 }
+
+@Test
+public void testIsValidAliasPath() throws Exception {

Review comment:
   Have you considered making that method have `package` level access by 
removing the `private` modifier? It might make the code simpler with no ill 
side-effects.

##
File path: 
src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapConfigurationProvider.java
##
@@ -78,4 +78,6 @@ public int compareTo(VanityPathConfig o2) {
  * If null is returned, all paths are allowed.
  */
 List getVanityPathConfig();
+
+List getAliasPath();

Review comment:
   I think getAllowedAliasPaths would be better.Also please document what 
this returns, if returns is nullable and what that means, etc.

##
File path: 
src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryConfig.java
##
@@ -149,6 +149,12 @@
  " and on the alias update time if the number of aliases 
is huge (over 1).")
 boolean resource_resolver_optimize_alias_resolution() default true;
 
+@AttributeDefinition(name = "Allowed Optimize alias path",
+ description = "This setting can contain a list of path prefixes, e.g. 
/libs/, /content/. If " +
+ "such a list 

[GitHub] [sling-org-apache-sling-feature-cpconverter] bosschaert commented on a change in pull request #32: Issue/sling 9881

2020-11-06 Thread GitBox


bosschaert commented on a change in pull request #32:
URL: 
https://github.com/apache/sling-org-apache-sling-feature-cpconverter/pull/32#discussion_r518742805



##
File path: 
src/main/java/org/apache/sling/feature/cpconverter/vltpkg/VaultPackageAssembler.java
##
@@ -105,7 +105,7 @@ private static VaultPackageAssembler create(VaultPackage 
vaultPackage, Workspace
 Properties properties = new Properties();
 properties.setProperty(PackageProperties.NAME_VERSION,

packageProperties.getProperty(PackageProperties.NAME_VERSION)
- + '-'
+ + '.'

Review comment:
   Is this change related?





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-feature-cpconverter] bosschaert commented on a change in pull request #32: Issue/sling 9881

2020-11-06 Thread GitBox


bosschaert commented on a change in pull request #32:
URL: 
https://github.com/apache/sling-org-apache-sling-feature-cpconverter/pull/32#discussion_r518742489



##
File path: 
src/main/java/org/apache/sling/feature/cpconverter/handlers/XmlConfigurationEntryHandler.java
##
@@ -65,13 +74,77 @@ protected void onJcrRootElement(String uri, String 
localName, String qName, Attr
 
 if (attributeValue != null && !attributeValue.isEmpty()) {
 DocViewProperty property = 
DocViewProperty.parse(attributeQName, attributeValue);
-
+Object value = property.values;
+List strValues = 
Arrays.asList(property.values);
+switch (property.type) {
+case PropertyType.DATE:

Review comment:
   The JCR 
https://docs.adobe.com/docs/en/spec/javax.jcr/javadocs/jcr-2.0/javax/jcr/PropertyType.html
 contains more types than explicitly handled here. Are we sure that we cover 
all the ones we need?





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-feature-cpconverter] rombert commented on a change in pull request #32: Issue/sling 9881

2020-11-06 Thread GitBox


rombert commented on a change in pull request #32:
URL: 
https://github.com/apache/sling-org-apache-sling-feature-cpconverter/pull/32#discussion_r518727709



##
File path: 
src/main/java/org/apache/sling/feature/cpconverter/handlers/XmlConfigurationEntryHandler.java
##
@@ -65,13 +74,77 @@ protected void onJcrRootElement(String uri, String 
localName, String qName, Attr
 
 if (attributeValue != null && !attributeValue.isEmpty()) {
 DocViewProperty property = 
DocViewProperty.parse(attributeQName, attributeValue);
-
+Object value = property.values;
+List strValues = 
Arrays.asList(property.values);
+switch (property.type) {
+case PropertyType.DATE:
+// Date was never properly supported as osgi 
configs don't support dates so converting to millis 
+// Scenario should just be theoretical
+attributeQName += ":Long";
+value = Lists.transform(strValues, new 
Function() {
+   public Long apply(String s) {
+  Long res = null;
+  if (s != null) {
+   Calendar cal = ISO8601.parse(s);
+   if (cal != null) {
+   res = cal.getTimeInMillis();
+   }
+  } 
+  return res;
+   }
+}).toArray();
+break;
+case PropertyType.DOUBLE:
+attributeQName += ":Double";
+value = Lists.transform(strValues, new 
Function() {
+   public Double apply(String s) {
+  Double res = null;
+  try {
+  res = Double.parseDouble(s);
+  } catch ( NumberFormatException ex ){
+  // ignore as nonexisting

Review comment:
   Are you sure that we should just skip invalid values for doubles and 
longs and not fail the conversion process?





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-feature-cpconverter] sonarcloud[bot] commented on pull request #32: Issue/sling 9881

2020-11-06 Thread GitBox


sonarcloud[bot] commented on pull request #32:
URL: 
https://github.com/apache/sling-org-apache-sling-feature-cpconverter/pull/32#issuecomment-723053179


   Kudos, SonarCloud Quality Gate passed!
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter=32=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter=32=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter=32=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter=32=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter=32=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter=32=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter
 uest=32=false=SECURITY_HOTSPOT) [0 Security 
Hotspots](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter=32=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter=32=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter=32=false=CODE_SMELL)
 [5 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter=32=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-cpconverter=32=new_coverage=list)
 [90.9% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-cpconverter=32=new_coverage=list)
  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-cpconverter=32=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-cpconverter=32=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 
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] [Commented] (SLING-9881) CPConverter dropping type information on sling:OsgiConfig nodes

2020-11-06 Thread Jira


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

Dominik Süß commented on SLING-9881:


Created PR 
https://github.com/apache/sling-org-apache-sling-feature-cpconverter/pull/32 
with patch.

> CPConverter dropping type information on sling:OsgiConfig nodes
> ---
>
> Key: SLING-9881
> URL: https://issues.apache.org/jira/browse/SLING-9881
> Project: Sling
>  Issue Type: Bug
>  Components: Content-Package to Feature Model Converter
>Affects Versions: Content-Package to Feature Model Converter 1.0.16
>Reporter: Dominik Süß
>Priority: Critical
>
> The implementation of the converter for sling:OsgiConfig nodes 
> (XmlConfigurationEntryHandler) currently ignores the type of the properties 
> and transforms everything into Strings (as DocViewProperty returns values as 
> String representations with separate type property).
> This leads to broken configurations in case of the use of those config nodes 
> with typed properties.



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


Re: [VOTE] Release Apache Sling GraphQL Core 0.0.8

2020-11-06 Thread Robert Munteanu
On Thu, 2020-11-05 at 15:31 +0100, Bertrand Delacretaz wrote:
> Please vote to approve this release:

+1
Robert


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


Re: [VOTE] Release Apache Sling Content Package Archetype 1.0.0

2020-11-06 Thread Robert Munteanu
On Fri, 2020-11-06 at 13:18 +0100, Robert Munteanu wrote:
> Please vote to approve this release:

+1
Robert


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


[GitHub] [sling-org-apache-sling-feature-cpconverter] DominikSuess opened a new pull request #32: Issue/sling 9881

2020-11-06 Thread GitBox


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


   



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




[VOTE] Release Apache Sling Content Package Archetype 1.0.0

2020-11-06 Thread Robert Munteanu
Hi,

This is a first release of the tooling, so no issues fixed (but a
version was created):
https://issues.apache.org/jira/browse/SLING/fixforversion/12349357

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

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 2369 /tmp/sling-staging

Please vote to approve this release:

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

This majority vote is open for at least 72 hours.

Regards,
Robert Munteanu



[jira] [Created] (SLING-9881) CPConverter dropping type information on sling:OsgiConfig nodes

2020-11-06 Thread Jira
Dominik Süß created SLING-9881:
--

 Summary: CPConverter dropping type information on sling:OsgiConfig 
nodes
 Key: SLING-9881
 URL: https://issues.apache.org/jira/browse/SLING-9881
 Project: Sling
  Issue Type: Bug
  Components: Content-Package to Feature Model Converter
Affects Versions: Content-Package to Feature Model Converter 1.0.16
Reporter: Dominik Süß


The implementation of the converter for sling:OsgiConfig nodes 
(XmlConfigurationEntryHandler) currently ignores the type of the properties and 
transforms everything into Strings (as DocViewProperty returns values as String 
representations with separate type property).

This leads to broken configurations in case of the use of those config nodes 
with typed properties.



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


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

2020-11-06 Thread Apache Jenkins Server
p [164] EventDispatcher: Error 
during dispatch. (java.lang.IllegalStateException: The bundle is uninstalled.)
ERROR: Bundle org.apache.sling.scripting.core [159] EventDispatcher: Error 
during dispatch. (java.lang.IllegalStateException: The bundle is uninstalled.)
ERROR: Bundle org.apache.felix.healthcheck.generalchecks [56] EventDispatcher: 
Error during dispatch. (java.lang.IllegalStateException: The bundle is 
uninstalled.)
[INFO] 
[INFO] --- ianal-maven-plugin:1.0-alpha-1:verify-legal-files (default) @ 
org.apache.sling.launchpad.testing ---
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by 
org.codehaus.groovy.reflection.CachedConstructor 
(file:/home/jenkins/.m2/repository/org/codehaus/groovy/groovy-all-minimal/1.5.6/groovy-all-minimal-1.5.6.jar)
 to constructor java.io.File(java.lang.String,java.io.File)
WARNING: Please consider reporting this to the maintainers of 
org.codehaus.groovy.reflection.CachedConstructor
WARNING: Use --illegal-access=warn to enable warnings of further illegal 
reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Checking legal files in: 
org.apache.sling.launchpad.testing-12-SNAPSHOT.jar
[INFO] Checking legal files in: 
org.apache.sling.launchpad.testing-12-SNAPSHOT-sources.jar
[INFO] 
[INFO] --- apache-rat-plugin:0.11:check (default) @ 
org.apache.sling.launchpad.testing ---
[INFO] 51 implicit excludes (use -debug for more details).
[INFO] Exclude: DEPENDENCIES
[INFO] Exclude: src/main/appended-resources/META-INF/*
[INFO] Exclude: velocity.log
[INFO] Exclude: target/*
[INFO] Exclude: README.md
[INFO] Exclude: maven-eclipse.xml
[INFO] Exclude: .*
[INFO] Exclude: .*/**
[INFO] Exclude: **/*.json
[INFO] Exclude: DEPENDENCIES
[INFO] Exclude: **/*.rej
[INFO] Exclude: hs_err_*.log
[INFO] Exclude: **/repository/index/*/index-details.txt
[INFO] Exclude: bnd.bnd
[INFO] 6 resources included (use -debug for more details)
[INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 
approved: 5 licence.
[INFO] 
[INFO] --- maven-failsafe-plugin:2.21.0:verify (default) @ 
org.apache.sling.launchpad.testing ---
[INFO] 
[INFO] BUILD FAILURE
[INFO] 
[INFO] Total time:  05:07 min
[INFO] Finished at: 2020-11-06T11:28:34Z
[INFO] 
[WARNING] The requested profile "ci" could not be activated because it does not 
exist.
[INFO] [jenkins-event-spy] Generated 
/home/jenkins/jenkins-agent/workspace/e-sling-launchpad-testing_master@tmp/withMavene13e3518/maven-spy-20201106-112327-320824566554437345571.log
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-failsafe-plugin:2.21.0:verify (default) on 
project org.apache.sling.launchpad.testing: There are test failures.
[ERROR] 
[ERROR] Please refer to 
/home/jenkins/jenkins-agent/workspace/e-sling-launchpad-testing_master/target/failsafe-reports
 for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, 
[date].dumpstream and [date]-jvmRun[N].dumpstream.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[Pipeline] }
[DevOpticsMavenPublisher] dependencies consumed: 0, artifacts produced: 0
[withMaven] Publishers: Pipeline Graph Publisher: 1 ms, CloudBees DevOptics 
Gate Artifact Publisher: 35145 ms
[Pipeline] // withMaven
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // timeout
[Pipeline] stage
[Pipeline] { (Notifications)
[Pipeline] echo
Status change is BROKEN, notifications will be sent.
[Pipeline] emailext

[jira] [Commented] (SLING-9535) Improve performance of sling:alias Query when Optimize alias resolution is activated

2020-11-06 Thread Akanksha Jain (Jira)


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

Akanksha Jain commented on SLING-9535:
--

Hello 

[~rombert] [~jsedding] [~cziegeler] 

I have prepared the Patch, PR Link: 
[https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/24]

PR is already reviewed by my team, request you to review it, and if it looks 
fine, Please merge it to master as I don't have commit rights.

 

> Improve performance of sling:alias Query when Optimize alias resolution is 
> activated
> 
>
> Key: SLING-9535
> URL: https://issues.apache.org/jira/browse/SLING-9535
> Project: Sling
>  Issue Type: Improvement
>  Components: ResourceResolver
>Reporter: Leonardo Derks
>Priority: Major
> Attachments: image-2020-06-19-18-29-24-335.png, 
> image-2020-06-19-18-33-21-657.png
>
>
> Improve performance of sling:alias Query when Optimize alias resolution is 
> activated in the Resource Resolver Factory:
> !image-2020-06-19-18-29-24-335.png!
> By checking the logs at startup this query is executed:
> {noformat}
> (query=SELECT sling:alias FROM nt:base WHERE sling:alias IS NOT NULL, path=*, 
> property=[sling:alias=[is not null]]){noformat}
> *The part that will be good to improve is that the query is not executed for 
> path=*, instead a predefined set of locations is used.*
> (Something similar as it is for the Vanity Paths will be nice):
> !image-2020-06-19-18-33-21-657.png!
> Then if none fo these are configured then the query is executed with path=*.
>  
> In our project several versions are created per page and it turns out that 
> the sling:alias found under _/jcr:system/jcr:versionStorage_ are also 
> including in the query exceeding the 1 limit mentioned in the warning 
> message of the property:
> _This might have an impact on the startup time and on the alias update time 
> if the number of aliases is huge (over 1)_
>  
> We might have a different approach to solve our issue but did not want to 
> leave this topic in the air. Might be also a good improvement for others.
>  
> Thanks
>  



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


Re: New git repo: sling-content-package-archetype (was: [sling 12] Content-Package maven archetype)

2020-11-06 Thread Robert Munteanu
On Tue, 2020-11-03 at 12:54 +0100, Robert Munteanu wrote:
> Hi,
> 
> On Fri, 2020-05-08 at 11:59 +0200, Robert Munteanu wrote:
> > On Fri, 2020-05-08 at 00:36 +0200, Robert Munteanu wrote:
> > > I don't really have a timeline, as it might've become apparent :-
> > > )
> > > So
> > > 
> > > if you find the time to update the archetype, that'd be great.
> > > It's
> > > 
> > > just that for me the quickest path is to push the content-package
> > > 
> > > archetype that I have sitting on my local machine and polished a
> > > bit
> > > 
> > > today.
> > 
> > FWIW, I have pushed the code that I have to GitHub (outside of the
> > apache org, for now)
> > 
> >   https://github.com/rombert/content-package-archetype/
> 
> Discusssions seem to have died down. I propose to move the archetype
> to
> the ASF org.
> 
> repository name: sling-content-package-archetype
> artifact id: sling-content-package-archetype
> 

It was already there, I missed it somehow ...

  https://github.com/apache/sling-content-package-archetype

Thanks,
Robert



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

2020-11-06 Thread Bertrand Delacretaz (Jira)


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

Bertrand Delacretaz commented on SLING-9839:


I'm not saying it is wrong but it is likely to break the build for some modules 
which do not build with JDK11.

Running {{mvn -U clean verify sonar:sonar}} with JDK11 for 
{{sling-org-apache-sling-adapter-annotations-it}}, for example, fails with a 
{{NullPointerException}} in {{maven-failsafe-plugin}}.

That's probably easy to fix, and should be, but I didn't want to let my changes 
in yesterday night before going offline and risk breaking many builds.

The best is probably to re-add my changes (or better ones) to run {{mvn 
sonar:sonar}} with JDK 11, see which modules break and fix those. I just didn't 
want to do that without warning others.

> 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
>Priority: Major
>
> 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)


[jira] [Resolved] (SLING-3535) reduce duplicated code in content loader

2020-11-06 Thread Oliver Lietz (Jira)


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

Oliver Lietz resolved SLING-3535.
-
Resolution: Done

[~enorman], Right – the 
[Loader|http://svn.apache.org/viewvc/sling/tags/org.apache.sling.jcr.contentloader-2.1.8/src/main/java/org/apache/sling/jcr/contentloader/internal/Loader.java?revision=1591891=markup]
 is gone. Closing.

> reduce duplicated code in content loader
> 
>
> Key: SLING-3535
> URL: https://issues.apache.org/jira/browse/SLING-3535
> Project: Sling
>  Issue Type: Improvement
>  Components: JCR
>Affects Versions: JCR ContentLoader 2.1.6
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
>Priority: Major
> Fix For: JCR ContentLoader 2.4.2
>
>
> e.g. {{DefaultContentImporter}} and {{Loader}} can share more code in 
> {{BaseImportLoader}}



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


[jira] [Updated] (SLING-3535) reduce duplicated code in content loader

2020-11-06 Thread Oliver Lietz (Jira)


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

Oliver Lietz updated SLING-3535:

Fix Version/s: (was: JCR ContentLoader 2.4.2)

> reduce duplicated code in content loader
> 
>
> Key: SLING-3535
> URL: https://issues.apache.org/jira/browse/SLING-3535
> Project: Sling
>  Issue Type: Improvement
>  Components: JCR
>Affects Versions: JCR ContentLoader 2.1.6
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
>Priority: Major
>
> e.g. {{DefaultContentImporter}} and {{Loader}} can share more code in 
> {{BaseImportLoader}}



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


[jira] [Resolved] (SLING-9666) Provide an API for content processing

2020-11-06 Thread Oliver Lietz (Jira)


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

Oliver Lietz resolved SLING-9666.
-
Resolution: Done

> Provide an API for content processing
> -
>
> Key: SLING-9666
> URL: https://issues.apache.org/jira/browse/SLING-9666
> Project: Sling
>  Issue Type: New Feature
>  Components: Commons
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
>Priority: Major
> Fix For: Commons Content Processing 1.0.0
>
>




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


[jira] [Resolved] (SLING-9665) Provide an API for content analyzing

2020-11-06 Thread Oliver Lietz (Jira)


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

Oliver Lietz resolved SLING-9665.
-
Resolution: Done

> Provide an API for content analyzing
> 
>
> Key: SLING-9665
> URL: https://issues.apache.org/jira/browse/SLING-9665
> Project: Sling
>  Issue Type: New Feature
>  Components: Commons
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
>Priority: Major
> Fix For: Commons Content Analyzing 1.0.0
>
>




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


[jira] [Resolved] (SLING-9846) Onboard Commons Content Processing to SonarCloud

2020-11-06 Thread Oliver Lietz (Jira)


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

Oliver Lietz resolved SLING-9846.
-
Resolution: Done

[~bellingard], Thanks!

> Onboard Commons Content Processing to SonarCloud
> 
>
> Key: SLING-9846
> URL: https://issues.apache.org/jira/browse/SLING-9846
> Project: Sling
>  Issue Type: Task
>  Components: Commons
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
>Priority: Major
> Fix For: Commons Content Processing 1.0.0
>
>
> {{sling-org-apache-sling-commons-content-processing}}



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


[jira] [Resolved] (SLING-9845) Onboard Commons Content Analyzing to SonarCloud

2020-11-06 Thread Oliver Lietz (Jira)


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

Oliver Lietz resolved SLING-9845.
-
Resolution: Done

[~bellingard], Thanks!

> Onboard Commons Content Analyzing to SonarCloud
> ---
>
> Key: SLING-9845
> URL: https://issues.apache.org/jira/browse/SLING-9845
> Project: Sling
>  Issue Type: Task
>  Components: Commons
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
>Priority: Major
> Fix For: Commons Content Analyzing 1.0.0
>
>
> {{sling-org-apache-sling-commons-content-analyzing}}



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