[jira] [Commented] (SLING-8562) Unable to resolve ESP scripts loaded from Filesystem Resource Provider

2019-07-08 Thread Ben Fortuna (JIRA)


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

Ben Fortuna commented on SLING-8562:


Can reproduce issue with both Java 8 and Java 11.

It appears that the jsFunctions are not being registered with the Rhino script 
engine, so it falls back on calling
{code:java}
javax.jcr.Node.getNodes(String){code}
This is possibly also happening with regular bundles, but in such cases the 
Node implementation is an actual JCR node rather than the FsNode partial 
implementation.

I'd be interested to know what the roadmap for Javascript support in Sling 
involves, as Nashorn is being deprecated in favour of GraalVM, so is Rhino the 
preferred script engine?

 

> Unable to resolve ESP scripts loaded from Filesystem Resource Provider
> --
>
> Key: SLING-8562
> URL: https://issues.apache.org/jira/browse/SLING-8562
> Project: Sling
>  Issue Type: Bug
>Affects Versions: Scripting Core 2.0.46, File System Resource Provider 
> 2.1.16
>Reporter: Ben Fortuna
>Priority: Major
>
> A simple test fails when trying to load a resource via Sling Filesystem 
> Resource Provider.
> /content/sample/index.json:
> {code:java}
> {
>   "sling:resourceType": "sample/page/index",
>   "jcr:primaryType": "nt:unstructured",
>   "title": "Sample App"
> }{code}
>  
> /apps/sample/page/index/html.esp:
> {code:java}
> 
> ${currentNode.title}
> 
> {code}
>  
> When both content and app are mounted via Filesystem Resource Provider config 
> the following error results:
> {code:java}
> Internal Server Error (500)
> Exception:
> java.lang.UnsupportedOperationException
>   at 
> org.apache.sling.fsprovider.internal.mapper.jcr.FsNode.getNodes(FsNode.java:517)
>   at 
> org.apache.sling.scripting.javascript.wrapper.ScriptableNode.get(ScriptableNode.java:319)
> ...{code}
>  
> Basically the javascript renderer tries to call `Node.getNodes(pattern)` to 
> resolve the property `currentNode.title` but Filesystem Resource Provider 
> doesnt support this method.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Re: [VOTE] Release Apache Sling Dynamic Include 3.1.4

2019-07-08 Thread Daniel Klco
+1

On Mon, Jul 8, 2019 at 2:33 PM Andreas Schaefer 
wrote:

> +1 (non-binding)
>
> - Andy
>
> > On Jul 8, 2019, at 3:23 AM, Robert Munteanu  wrote:
> >
> > Hi,
> >
> > We solved 2 issue(s) in this release:
> > https://issues.apache.org/jira/browse/SLING/fixforversion/12343884
> >
> > Staging repository:
> > https://repository.apache.org/content/repositories/orgapachesling-2105/
> >
> > 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 2105 /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: Sling Content Package to Feature Model Maven Plugin

2019-07-08 Thread Andreas Schaefer
Hi Simone

I ran into a snafu with the Sling Feature Maven Plugin. This plugin is doing a 
blank check during the initialization phase which is causing headaches for the 
CP Converter goal.

There are various issues but the most glaring is the fact that when I use 
placeholders in the FM id like "${project.groupId}” then it will fail to even 
clean the project with ‘mvn clean’. That we either disable these tests or move 
them in the respective Mojos?

Cheers - Andy Schaefer

> On Jul 2, 2019, at 10:29 AM, Simone Tripodi  wrote:
> 
> Hi Andreas,
> I had a quick overview of your work and you did great - I'd suggest
> you to propose this new MOJO as part of the slingfeature-maven-plugin,
> rather than defining a new one, it will be easier to have it
> integrated.
> 
> My 2 cents and keep up the good work!
> All the best,
> ~Simo
> 
> http://people.apache.org/~simonetripodi/
> http://www.99soft.org/
> 
> On Tue, Jun 18, 2019 at 7:25 AM Andreas Schaefer
>  wrote:
>> 
>> Hi
>> 
>> I just committed the first draft of the 'Sling Content Package to Feature 
>> Model Maven Plugin’ into branch  feature/sling-cpconverter-maven-plugin of 
>> the sling-whiteboard project.
>> 
>> The IT tests should give a rough idea on how to use it and I will 
>> incorporate it into the Peregrine CMS project to have a better End-to-End 
>> test for this plugin.
>> 
>> For now this plugin is intended to generated a side-car FM configuration for 
>> an existing Content Package including installing it into the local Maven 
>> repo.
>> 
>> I am not a crack in writing Maven Plugins so this plugin for sure has it 
>> rough edges and so any feedback is appreciated.
>> 
>> Cheers - Andy Schaefer



Re: [VOTE] Release Apache Sling Dynamic Include 3.1.4

2019-07-08 Thread Andreas Schaefer
+1 (non-binding)

- Andy

> On Jul 8, 2019, at 3:23 AM, Robert Munteanu  wrote:
> 
> Hi,
> 
> We solved 2 issue(s) in this release:
> https://issues.apache.org/jira/browse/SLING/fixforversion/12343884
> 
> Staging repository:
> https://repository.apache.org/content/repositories/orgapachesling-2105/
> 
> 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 2105 /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 Dynamic Include 3.1.4

2019-07-08 Thread Radu Cotescu
+1 (checked build and signatures)

> On 8 Jul 2019, at 12:23, Robert Munteanu  wrote:
> 
> 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: [org.apache.sling.jcr.contentparser] can we decouple it from JCR?

2019-07-08 Thread Radu Cotescu
Thanks for the +1s. I’ll start working in the whiteboard and hope to have 
everything ready for review by the end of the week.

[jira] [Created] (SLING-8567) Support start levels declared via JCR path in input packages to cp2sf

2019-07-08 Thread Georg Henzler (JIRA)
Georg Henzler created SLING-8567:


 Summary: Support start levels declared via JCR path in input 
packages to cp2sf
 Key: SLING-8567
 URL: https://issues.apache.org/jira/browse/SLING-8567
 Project: Sling
  Issue Type: Improvement
  Components: Content-Package to Feature Model Converter
Reporter: Georg Henzler
Assignee: Georg Henzler


The JCR Installer provider supports start levels [1], hence the Content-Package 
to Feature Model Converter should also support this feature.

[1]  
https://sling.apache.org/documentation/bundles/jcr-installer-provider.html#start-level-support
 - this was introduced with SLING-2011



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] [sling-org-apache-sling-commons-html] JEBailey opened a new pull request #4: SLING-8566 support processing instruction and xml declaration in SAX processing

2019-07-08 Thread GitBox
JEBailey opened a new pull request #4: SLING-8566 support processing 
instruction and xml declaration in SAX processing
URL: https://github.com/apache/sling-org-apache-sling-commons-html/pull/4
 
 
   


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


With regards,
Apache Git Services


[GitHub] [sling-org-apache-sling-starter] jmarrero opened a new pull request #5: Update the jackson version to 2.9.9

2019-07-08 Thread GitBox
jmarrero opened a new pull request #5: Update the jackson version to 2.9.9
URL: https://github.com/apache/sling-org-apache-sling-starter/pull/5
 
 
   Let me know if there is another place or component this should be updated 
in. However, after changing the file I confirmed in the Web Console that the 
2.9.9 version of the jackson-annotations, jackson-core and jackson-databind 
components are in use.


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


With regards,
Apache Git Services


[jira] [Created] (SLING-8566) commons html - document creation fails with tag stream on certain input

2019-07-08 Thread Jason E Bailey (JIRA)
Jason E Bailey created SLING-8566:
-

 Summary: commons html - document creation fails with tag stream on 
certain input
 Key: SLING-8566
 URL: https://issues.apache.org/jira/browse/SLING-8566
 Project: Sling
  Issue Type: Bug
  Components: Commons
Affects Versions: Commons HTML 1.1.0
Reporter: Jason E Bailey
Assignee: Jason E Bailey
 Fix For: Commons HTML 1.1.2


This occurred due to a conflict between an HTML parser and a need to support an 
XML interface. In HTML a processing instruction is merely an undefined tag. 
Which in the SAX parser needs to be handled as a processing instruction, except 
for the case where the instruction is '?xml'

Additionally the EOF tag may not be generated, so I explicitly call the end of 
document for the handlers.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SLING-8563) Error when building messages bundle with java 11

2019-07-08 Thread Christian Schneider (JIRA)


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

Christian Schneider resolved SLING-8563.

Resolution: Fixed

> Error when building messages bundle with java 11
> 
>
> Key: SLING-8563
> URL: https://issues.apache.org/jira/browse/SLING-8563
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Messages 0.1.0
>Reporter: Christian Schneider
>Assignee: Christian Schneider
>Priority: Major
> Fix For: Content Distribution Journal Messages 0.1.2
>
>
> [*ERROR*] Failed to execute goal 
> org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test *(default-test)* 
> on project org.apache.sling.distribution.journal.messages: *Execution 
> default-test of goal 
> org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed.*: 
> NullPointerException -> [Help 1]
> From the linked discussion it seems the maven-surefire-plugin 2.20.1 is not 
> compatible to Java 11.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Re: [VOTE] Release Apache Sling Dynamic Include 3.1.4

2019-07-08 Thread Robert Munteanu
On Mon, 2019-07-08 at 10:23 +, Robert Munteanu wrote:
>   [ ] +1 Approve the release

+1

Robert


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


[VOTE] Release Apache Sling Dynamic Include 3.1.4

2019-07-08 Thread Robert Munteanu
Hi,

We solved 2 issue(s) in this release:
https://issues.apache.org/jira/browse/SLING/fixforversion/12343884

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

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 2105 /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] [Updated] (SLING-8427) Sling Dynamic Include - TTL not being set on synthetic resources

2019-07-08 Thread Robert Munteanu (JIRA)


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

Robert Munteanu updated SLING-8427:
---
Fix Version/s: (was: Dynamic Include 3.1.4)
   Dynamic Include 3.1.6

> Sling Dynamic Include - TTL not being set on synthetic resources
> 
>
> Key: SLING-8427
> URL: https://issues.apache.org/jira/browse/SLING-8427
> Project: Sling
>  Issue Type: Bug
>Affects Versions: Dynamic Include 3.1.2
> Environment: AEM 6.3 - AEM 6.5
>Reporter: Eric Van Geem
>Priority: Major
> Fix For: Dynamic Include 3.1.6
>
>
> When a TTL value is configured, the Cache-Control header does not get set in 
> the response headers of the resource when the resource is synthetic. 
> *Expected behavior:*
> The existing SyntheticResourceFilter is responsible for identifying if the 
> requested resource is synthetic, and if so, force the resourceType into the 
> request by taking the resourceType from the request URL suffix. Then, the 
> CacheControlFilter is to be invoked after this which reads the resource from 
> the request (now the forced resourceType from the prior step) and sets the 
> appropriate Cache-Control header if this resourceType is configured for SDI.
> *Actual behavior:*
> The CacheControlFilter is never executed after the SyntheticResourceFilter 
> sets the forced resourceType in the request for the synthetic resource, thus 
> the Cache-Control response header never gets set. 
>  
> More details:
> I believe the cause of this issue is due to the way the CacheControlFilter's 
> filter scope is defined; it is missing the *forward* filter scope. The 
> SyntheticResourceFilter forces the resourceType by passing a new object of 
> options to the request dispatcher 
> {code:java}
> dispatcher = slingRequest.getRequestDispatcher(resource, options);{code}
> This is then followed by a call to 
> {code:java}
> dispatcher.forward(request, response);{code}
> to forward the request in the filter chain.
> This is where the CacheControlFilter should receive the request, but does not 
> happen because the CacheControlFilter's filter scope has not been declared to 
> receive forwarded requests. Simply adding the *forward* scope to the 
> CacheControlFilter's list of scopes seems to resolve the issue.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SLING-8255) Use of mappings in SDI

2019-07-08 Thread Robert Munteanu (JIRA)


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

Robert Munteanu updated SLING-8255:
---
Fix Version/s: (was: Dynamic Include 3.1.4)
   Dynamic Include 3.1.6

> Use of mappings in SDI
> --
>
> Key: SLING-8255
> URL: https://issues.apache.org/jira/browse/SLING-8255
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions
>Affects Versions: Dynamic Include 3.1.2
>Reporter: Michał Tobiasz
>Priority: Minor
> Fix For: Dynamic Include 3.1.6
>
>
> Hello,
> It would be great to consider using mappings for SDI. In our case, we would 
> like to configure mappings for snippets to use a different format (short 
> names).
>  
> [~rombert]  what do you think of using ResourceResolver#map when building URL.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Re: [DISCUSS] Support ZonedDateTime in ValueMap

2019-07-08 Thread Julian Sedding
Thanks Jason. I've updated to Sling parent 34 now instead of
explicitly setting the minimum Java version to 8. While I would be
interested in updating it to sling-bundle-parent 35, I currently don't
have the spare cycles to properly test the bundle metadata after the
change.

Regards
Julian

On Fri, Jul 5, 2019 at 5:01 PM Jason E Bailey  wrote:
>
> The parent POM was updated to Java a while back, my understanding is if you 
> need to update a bundle to 8 as part of a story, there's no need for a 
> separate story.
>
> --
> Jason
>
> On Fri, Jul 5, 2019, at 10:39 AM, Julian Sedding wrote:
> > Hi all
> >
> > I've implemented these changes, but I had to increase the required
> > java version of JCR Resource to Java 8 (given ZonedDateTime was
> > introduced in Java 8).
> >
> > Is that ok? Should I create a separate ticket for the Java version
> > increase? And should I increase the bundle version as well, since its
> > compatibility changes?
> >
> > Regards
> > Julian
> >
> >
> > On Thu, Jul 4, 2019 at 6:18 PM Julian Sedding  wrote:
> > >
> > > That should have read:
> > >
> > > 've created SLING-8558 for tracking the change in ValueMapDecorator
> > > (API) and SLING-8559 for tracking the change in JcrValueMap (JCR
> > > Resource) for now.
> > >
> > > Regards
> > > Julian
> > >
> > > On Thu, Jul 4, 2019 at 12:09 PM Julian Sedding  wrote:
> > > >
> > > > Thanks Robert.
> > > >
> > > > I've created SLING-8558 for tracking the change in ValueMapDecorator
> > > > (API) and JcrValueMap (JCR Resource) for now.
> > > >
> > > > Regards
> > > > Julian
> > > >
> > > > On Tue, Jul 2, 2019 at 12:05 PM Robert Munteanu  
> > > > wrote:
> > > > >
> > > > > On Tue, 2019-07-02 at 12:01 +0200, Julian Sedding wrote:
> > > > > > Hi all
> > > > > >
> > > > > > I think it might make sense to support getting dates from ValueMaps
> > > > > > as
> > > > > > java.time.ZonedDateTime instances directly. I've been finding myself
> > > > > > converting Calendar instances after retrieving them from ValueMaps
> > > > > > quite a bit lately.
> > > > >
> > > > > Sounds good to me. Some notes:
> > > > >
> > > > > - calendar instances also have time zones attached, so we don't
> > > > > introduce anything suprising by returning dates with time zones
> > > > > attached.
> > > > > - we don't bump up the required JVM version as ZonedDateTime is
> > > > > available with Java >= 8.
> > > > >
> > > > > Robert
> > > > >
> >


[jira] [Resolved] (SLING-8565) Update JCR Resource to parent pom version 34

2019-07-08 Thread Julian Sedding (JIRA)


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

Julian Sedding resolved SLING-8565.
---
   Resolution: Fixed
Fix Version/s: JCR Resource 3.0.20

Fixed with [commit 
9804c7c|https://gitbox.apache.org/repos/asf?p=sling-org-apache-sling-jcr-resource.git;a=commitdiff;h=9804c7c].

> Update JCR Resource to parent pom version 34
> 
>
> Key: SLING-8565
> URL: https://issues.apache.org/jira/browse/SLING-8565
> Project: Sling
>  Issue Type: Improvement
>  Components: JCR
>Affects Versions: JCR Resource 3.0.18
>Reporter: Julian Sedding
>Assignee: Julian Sedding
>Priority: Major
> Fix For: JCR Resource 3.0.20
>
>
> Rather than setting the minimum Java version explicitly to Java 8, the JCR 
> Resource bundle's parent pom should be set to version 34.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (SLING-8565) Update JCR Resource to parent pom version 34

2019-07-08 Thread Julian Sedding (JIRA)
Julian Sedding created SLING-8565:
-

 Summary: Update JCR Resource to parent pom version 34
 Key: SLING-8565
 URL: https://issues.apache.org/jira/browse/SLING-8565
 Project: Sling
  Issue Type: Improvement
  Components: JCR
Affects Versions: JCR Resource 3.0.18
Reporter: Julian Sedding
Assignee: Julian Sedding


Rather than setting the minimum Java version explicitly to Java 8, the JCR 
Resource bundle's parent pom should be set to version 34.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Re: [org.apache.sling.jcr.contentparser] can we decouple it from JCR?

2019-07-08 Thread Nicolas Peltier
+1

Le ven. 5 juil. 2019 à 19:49, Julian Sedding  a écrit :

> +1 I like your idea!
>
> I vaguely remember having similar thoughts in the past, but considered
> it too much effort for what I was after at the time.
>
> Regards
> Julian
>
> On Fri, Jul 5, 2019 at 3:41 PM Jason E Bailey 
> wrote:
> >
> > +1 for this idea
> >
> > --
> > Jason
> >
> > On Thu, Jul 4, 2019, at 11:55 AM, Radu Cotescu wrote:
> > > Let me add more details. Three classes use JCR or JackRabbit
> dependencies:
> > >
> > > JcrXmlContentParser
> > > JcrXmlValueConverter
> > > XmlContentParser
> > > ParserHelper
> > >
> > > What I’d suggest would be to separate the API from the implementation
> > > and then provide the parsers from different pluggable modules. In
> > > addition to that, I think that the ParserHelper could maybe be exposed
> > > in the API as a final class, much like the ContentParserFactory, and
> > > use a different Calendar parser instead of
> > > org.apache.jackrabbit.util.ISO8601.
> > >
> > > I could prepare a PR if you agree with the changes.
> > >
> > > Thanks,
> > > Radu
> > >
> > > > On 4 Jul 2019, at 17:00, Radu Cotescu  wrote:
> > > >
> > > > Hi Stefan,
> > > >
> > > > I do know that the module has JCR in its name, but do you think that
> we could make the JCR stuff optional? I’d really like to reuse this module
> to parse JSON into Sling resource trees, but I’d like the JCR dependencies
> to be optional, since in my experimental setup I use a different resource
> provider.
> > > >
> > > > Thanks,
> > > > Radu
> > >
> > >
>