[GitHub] [sling-org-apache-sling-junit-core] nitin-nizhawan commented on pull request #3: SLING-9542, Unable to use junit categories with sling junit core

2020-06-22 Thread GitBox


nitin-nizhawan commented on pull request #3:
URL: 
https://github.com/apache/sling-org-apache-sling-junit-core/pull/3#issuecomment-647923997


   thanks @bdelacretaz 



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: Deprecated org.apache.sling.servlets.post.AbstractPostOperation

2020-06-22 Thread Carlos Munoz
Bertrand, I confirmed the approach works two ways:

1. By embedding the dependency directly in the bundle using the
 directive.

2. By using the  directive with the following content:
@org.apache.sling.servlets.post-*.jar!/org/apache/sling/servlets/post/impl/**
This includes the full private package that is not accessible as part of
the bundle.

Regards,

Carlos

On Mon, Jun 22, 2020 at 10:35 AM Bertrand Delacretaz 
wrote:

> On Mon, Jun 22, 2020 at 2:36 PM Carlos Munoz  wrote:
> > ...My suggestion would be to add this
> > solution you just proposed to the javadocs of those deprecated classes...
>
> Good idea  - let's wait until you confirm that it works for you and
> this sounds like a plan!
>
> -Bertrand
>
>


Re: [VOTE] Release Apache Sling Kickstart and Kickstart Maven Plugin version 0.0.4

2020-06-22 Thread Daniel Klco
+1

On Mon, Jun 22, 2020 at 5:24 PM Andreas Schaefer 
wrote:

> Hi,
>
> For most part this is a release to catch up with the changes /
> improvements of the Feature Model as a whole like support for Feature
> Archives and upgrading to newer releases.
>
> NOTE: due to the dependencies of Kickstart Project to the Kickstart Maven
> Plugin and vice versa there could be some failures in the Jackson tests.
>
> We solved 2 issues in this release:
> https://issues.apache.org/jira/projects/SLING/versions/12348280
> https://issues.apache.org/jira/projects/SLING/versions/12348424
>
> There are still some outstanding issues:
> https://issues.apache.org/jira/projects/SLING/versions/12348423
>
> This was moved to the next release as this was not that important as the
> user
> can use '-s' flag to accomplish the same thing.
>
> Staging repository:
> https://repository.apache.org/content/repositories/orgapachesling-2288
>
> 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 2288 /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.
>
> Cheers - Andy Schaefer


[GitHub] [sling-whiteboard] cmrockwell opened a new pull request #60: Saml2 auth handler/upgrade sling12 open samlv4 java11

2020-06-22 Thread GitBox


cmrockwell opened a new pull request #60:
URL: https://github.com/apache/sling-whiteboard/pull/60


   



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-9526) Allow launching feature model applications in external processes, non-blocking

2020-06-22 Thread Robert Munteanu (Jira)


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

Robert Munteanu commented on SLING-9526:


I have started work on a {{feature-launcher-maven-plugin}} in the Sling 
whiteboard at 
https://github.com/apache/sling-whiteboard/tree/master/feature-launcher-maven-plugin
 .

> Allow launching feature model applications in external processes, non-blocking
> --
>
> Key: SLING-9526
> URL: https://issues.apache.org/jira/browse/SLING-9526
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Reporter: Robert Munteanu
>Assignee: Robert Munteanu
>Priority: Major
> Fix For: slingfeature-maven-plugin 1.3.8
>
>
> It is currently not easily possible to launch a FM-based application as part 
> of an integration test, as the {{slingfeature-maven-plugin:launch}} goal 
> always blocks.
> I think we should keep this goal as-is, and add two new goals:
> - start
> - stop
> The plugin can then take a list of launch configurations that will be started 
> and stopped without blocking, and used in integration tests.
> The implementation can also be a part of another plug-in, as the 
> {{slingfeature-maven-plugin}} already does quite a lot.



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


[jira] [Assigned] (SLING-9526) Allow launching feature model applications in external processes, non-blocking

2020-06-22 Thread Robert Munteanu (Jira)


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

Robert Munteanu reassigned SLING-9526:
--

Assignee: Robert Munteanu

> Allow launching feature model applications in external processes, non-blocking
> --
>
> Key: SLING-9526
> URL: https://issues.apache.org/jira/browse/SLING-9526
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Reporter: Robert Munteanu
>Assignee: Robert Munteanu
>Priority: Major
> Fix For: slingfeature-maven-plugin 1.3.8
>
>
> It is currently not easily possible to launch a FM-based application as part 
> of an integration test, as the {{slingfeature-maven-plugin:launch}} goal 
> always blocks.
> I think we should keep this goal as-is, and add two new goals:
> - start
> - stop
> The plugin can then take a list of launch configurations that will be started 
> and stopped without blocking, and used in integration tests.
> The implementation can also be a part of another plug-in, as the 
> {{slingfeature-maven-plugin}} already does quite a lot.



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


[jira] [Resolved] (SLING-9538) Generated resource types do not normalize windows path separator

2020-06-22 Thread Karl Pauls (Jira)


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

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

I normalized the path in:

https://github.com/apache/sling-scriptingbundle-maven-plugin/commit/c3654d8b24c5e8ba196731903af021963748e8eb

and in 

https://github.com/apache/sling-scriptingbundle-maven-plugin/commit/4f602eb614fe05edf9ab50598124d4b62c2eb1bf

> Generated resource types do not normalize windows path separator
> 
>
> Key: SLING-9538
> URL: https://issues.apache.org/jira/browse/SLING-9538
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting Bundle Maven Plugin 0.2.0
>Reporter: Karl Pauls
>Assignee: Karl Pauls
>Priority: Major
> Fix For: Scripting Bundle Maven Plugin 0.2.2
>
>
> The resource types are taken from the path names of the scripts but don't 
> take into account the path separator. That makes them wrong when run on 
> windows.



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


[VOTE] Release Apache Sling Kickstart and Kickstart Maven Plugin version 0.0.4

2020-06-22 Thread Andreas Schaefer
Hi,

For most part this is a release to catch up with the changes / improvements of 
the Feature Model as a whole like support for Feature Archives and upgrading to 
newer releases.

NOTE: due to the dependencies of Kickstart Project to the Kickstart Maven 
Plugin and vice versa there could be some failures in the Jackson tests.

We solved 2 issues in this release:
https://issues.apache.org/jira/projects/SLING/versions/12348280
https://issues.apache.org/jira/projects/SLING/versions/12348424

There are still some outstanding issues:
https://issues.apache.org/jira/projects/SLING/versions/12348423

This was moved to the next release as this was not that important as the user
can use '-s' flag to accomplish the same thing.

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

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

Cheers - Andy Schaefer

[GitHub] [sling-org-apache-sling-models-impl] etugarev commented on a change in pull request #17: SLING-8706 - Injections for java.util.Optional<> should be automatically optional

2020-06-22 Thread GitBox


etugarev commented on a change in pull request #17:
URL: 
https://github.com/apache/sling-org-apache-sling-models-impl/pull/17#discussion_r443834237



##
File path: src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
##
@@ -495,12 +480,97 @@ public RuntimeException inject(InjectableElement element, 
Object value) {
 }
 }
 
+@NotNull
+private InjectableElement getElement(InjectableElement element, Type type) 
{

Review comment:
   Thanks for this idea, will give it a try





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-models-impl] etugarev commented on a change in pull request #17: SLING-8706 - Injections for java.util.Optional<> should be automatically optional

2020-06-22 Thread GitBox


etugarev commented on a change in pull request #17:
URL: 
https://github.com/apache/sling-org-apache-sling-models-impl/pull/17#discussion_r443833158



##
File path: src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
##
@@ -495,12 +480,97 @@ public RuntimeException inject(InjectableElement element, 
Object value) {
 }
 }
 
+@NotNull
+private InjectableElement getElement(InjectableElement element, Type type) 
{
+return new InjectableElement() {
+@Override
+public AnnotatedElement getAnnotatedElement() {
+return element.getAnnotatedElement();
+}
+
+@Override
+public Type getType() {
+return type;
+}
+
+@Override
+public boolean isPrimitive() {
+return element.isPrimitive();
+}
+
+@Override
+public String getName() {
+return element.getName();
+}
+
+@Override
+public String getSource() {
+return element.getSource();
+}
+
+@Override
+public String getVia() {
+return element.getVia();
+}
+
+@Override
+public Class getViaProviderType() {
+return element.getViaProviderType();
+}
+
+@Override
+public boolean hasDefaultValue() {
+return element.hasDefaultValue();
+}
+
+@Override
+public Object getDefaultValue() {
+return element.getDefaultValue() == null ? Optional.empty() : 
element.getDefaultValue();

Review comment:
   Good idea, this simplifies things a bit, will give it a try.





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

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




[jira] [Resolved] (SLING-9543) Add Support for Feature Archives and Provide the ability to use a custom Kickstart

2020-06-22 Thread Andreas Schaefer (Jira)


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

Andreas Schaefer resolved SLING-9543.
-
Resolution: Fixed

Fixed and committed

> Add Support for Feature Archives and Provide the ability to use a custom 
> Kickstart
> --
>
> Key: SLING-9543
> URL: https://issues.apache.org/jira/browse/SLING-9543
> Project: Sling
>  Issue Type: Improvement
>  Components: Feature Model
>Affects Versions: Feature Model Sling Maven Kickstart Plugin 0.0.2
>Reporter: Andreas Schaefer
>Priority: Major
> Fix For: Feature Model Sling Maven Kickstart Plugin 0.0.4
>
>
> Add the support for Feature Archives (done through the Kickstart Project) and 
> the ability to use a custom Kickstart Project as a JAR file or Maven 
> Dependency



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


[jira] [Created] (SLING-9543) Add Support for Feature Archives and Provide the ability to use a custom Kickstart

2020-06-22 Thread Andreas Schaefer (Jira)
Andreas Schaefer created SLING-9543:
---

 Summary: Add Support for Feature Archives and Provide the ability 
to use a custom Kickstart
 Key: SLING-9543
 URL: https://issues.apache.org/jira/browse/SLING-9543
 Project: Sling
  Issue Type: Improvement
  Components: Feature Model
Affects Versions: Feature Model Sling Maven Kickstart Plugin 0.0.2
Reporter: Andreas Schaefer
 Fix For: Feature Model Sling Maven Kickstart Plugin 0.0.4


Add the support for Feature Archives (done through the Kickstart Project) and 
the ability to use a custom Kickstart Project as a JAR file or Maven Dependency



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


[jira] [Updated] (SLING-9507) Add an option to Kickstart to prevent the use of the bundled Sling FM

2020-06-22 Thread Andreas Schaefer (Jira)


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

Andreas Schaefer updated SLING-9507:

Fix Version/s: (was: Feature Model Sling Kickstart Project 0.0.4)
   Feature Model Sling Kickstart Project 0.0.6

> Add an option to Kickstart to prevent the use of the bundled Sling FM
> -
>
> Key: SLING-9507
> URL: https://issues.apache.org/jira/browse/SLING-9507
> Project: Sling
>  Issue Type: New Feature
>  Components: Feature Model
>Affects Versions: Feature Model Sling Kickstart Project 0.0.2
>Reporter: Andreas Schaefer
>Assignee: Andreas Schaefer
>Priority: Major
> Fix For: Feature Model Sling Kickstart Project 0.0.6
>
>
> To make it easier and more expressive the Kickstart should provide a flag 
> (-ns) to disregard the bundled Sling FM so that an application can be 
> launched that is not tied to Sling and w/o having to misuse the -s option.



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


[jira] [Commented] (SLING-8706) Injections for java.util.Optional<> should be automatic optional

2020-06-22 Thread Jira


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

Jörg Hoh commented on SLING-8706:
-

I think everyone agrees, that even with the best approaches and design you 
cannot prevent simple errors, if the user/developer is not trained or is in 
such a hurry that even simple rules are ignored.

And yes, you can write failing code with {{Optional}} as well. But my personal 
impression is that it leads often/most times/often enough to rethink the usage 
of a field. More often than you think of "oh, that String can be {{Null}}, 
let's add a Null check".

Having said that, I think that it could be a nice extension. Probably not 
everyone will benefit from it the same way, but some do.

> Injections for java.util.Optional<> should be automatic optional 
> -
>
> Key: SLING-8706
> URL: https://issues.apache.org/jira/browse/SLING-8706
> Project: Sling
>  Issue Type: Improvement
>  Components: Sling Models
>Reporter: Jörg Hoh
>Priority: Major
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> The current approach to support optional injections requires to annotate the 
> field with {{@Optional}} plus proper handling within the javacode (null 
> checks etc), which can be forgotten.
> So instead of
> {code}
> @Inject @Optional
> String fieldname;
> {code}
> it should also be possible to use this
> {code}
> @Inject
> Optional fieldname;
> {code}
> with the very same semantic. But the developer is forced to deal with the 
> case that the value is not present.



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


[jira] [Commented] (SLING-8706) Injections for java.util.Optional<> should be automatic optional

2020-06-22 Thread Paul Bjorkstrand (Jira)


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

Paul Bjorkstrand commented on SLING-8706:
-

I agree with [~justinedelson] on the HTL side. Just because Sling Models 
supports this feature doesn't make it required to be supported in HTL (though, 
only one supporting with the other not supporting {{Optional}} could lead to 
some confusion). I also have never seen any (Java) serialization of Sling 
Models, so I don't see that as a barrier either. Besides, serialization [can be 
customized|https://howtodoinjava.com/java/serialization/custom-serialization-readobject-writeobject/]
 ([in more than one 
way|https://dzone.com/articles/how-to-customize-serialization-in-java-using-the-e])
 to work around non-serializable types already.

Based on the intended use of {{Optional}} (to be used at API boundaries aka 
method returns), this I feel is a gray area. While a field isn't technically 
part of an API, they are injected by some external process. One could argue 
that the fields are equivalent to the return values of that external process. 
In that argument, it makes sense to capture that intent in the type system 
itself, to capture the fact that "this field could be null, so you need to 
check it". This alone makes me think this is a reasonable approach to handling 
optional injections.

That being said, there is nothing stopping a developer from improperly using an 
{{Optional}}, say, by using {{.get()}} without first checking {{.isPresent()}}, 
in turn causing a NPE. While bad practice, yes, it happens frequently enough 
that I almost always have a conversation with my teams on proper {{Optional}} 
usage. I still believe this idea is reasonable, but I don't buy into the 
"optional will prevent NPEs" argument.

> Injections for java.util.Optional<> should be automatic optional 
> -
>
> Key: SLING-8706
> URL: https://issues.apache.org/jira/browse/SLING-8706
> Project: Sling
>  Issue Type: Improvement
>  Components: Sling Models
>Reporter: Jörg Hoh
>Priority: Major
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> The current approach to support optional injections requires to annotate the 
> field with {{@Optional}} plus proper handling within the javacode (null 
> checks etc), which can be forgotten.
> So instead of
> {code}
> @Inject @Optional
> String fieldname;
> {code}
> it should also be possible to use this
> {code}
> @Inject
> Optional fieldname;
> {code}
> with the very same semantic. But the developer is forced to deal with the 
> case that the value is not present.



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


[GitHub] [sling-org-apache-sling-models-impl] paul-bjorkstrand commented on a change in pull request #17: SLING-8706 - Injections for java.util.Optional<> should be automatically optional

2020-06-22 Thread GitBox


paul-bjorkstrand commented on a change in pull request #17:
URL: 
https://github.com/apache/sling-org-apache-sling-models-impl/pull/17#discussion_r443759845



##
File path: src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
##
@@ -495,12 +480,97 @@ public RuntimeException inject(InjectableElement element, 
Object value) {
 }
 }
 
+@NotNull
+private InjectableElement getElement(InjectableElement element, Type type) 
{
+return new InjectableElement() {
+@Override
+public AnnotatedElement getAnnotatedElement() {
+return element.getAnnotatedElement();
+}
+
+@Override
+public Type getType() {
+return type;
+}
+
+@Override
+public boolean isPrimitive() {
+return element.isPrimitive();
+}
+
+@Override
+public String getName() {
+return element.getName();
+}
+
+@Override
+public String getSource() {
+return element.getSource();
+}
+
+@Override
+public String getVia() {
+return element.getVia();
+}
+
+@Override
+public Class getViaProviderType() {
+return element.getViaProviderType();
+}
+
+@Override
+public boolean hasDefaultValue() {
+return element.hasDefaultValue();
+}
+
+@Override
+public Object getDefaultValue() {
+return element.getDefaultValue() == null ? Optional.empty() : 
element.getDefaultValue();
+}
+
+@Override
+public boolean isOptional(InjectAnnotationProcessor 
annotationProcessor) {
+return true;
+}
+};
+}
+
 private
 @Nullable
 RuntimeException injectElement(final InjectableElement element, final 
Object adaptable,
final @NotNull DisposalCallbackRegistry 
registry, final InjectCallback callback,
final @NotNull Map 
preparedValues,
final @Nullable BundleContext modelContext) 
{
+if (element instanceof InjectableField) {
+Type genericType = ((InjectableField) 
element).getFieldGenericType();
+
+if (genericType instanceof ParameterizedType) {
+ParameterizedType pType = (ParameterizedType) genericType;
+
+if (pType.getRawType().equals(Optional.class)) {
+InjectableElement el = getElement(element, 
pType.getActualTypeArguments()[0]);
+
+return injectElementInternal(el, adaptable, registry, new 
InjectCallback() {
+@Override
+public RuntimeException inject(InjectableElement 
element1, Object value) {
+return callback.inject(element, 
value.equals(Optional.empty())
+? value
+: Optional.of(value));

Review comment:
   Looks like @justinedelson beat me to the punch with the class suggestion 
 





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-models-impl] paul-bjorkstrand commented on a change in pull request #17: SLING-8706 - Injections for java.util.Optional<> should be automatically optional

2020-06-22 Thread GitBox


paul-bjorkstrand commented on a change in pull request #17:
URL: 
https://github.com/apache/sling-org-apache-sling-models-impl/pull/17#discussion_r443746315



##
File path: src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
##
@@ -495,12 +480,97 @@ public RuntimeException inject(InjectableElement element, 
Object value) {
 }
 }
 
+@NotNull
+private InjectableElement getElement(InjectableElement element, Type type) 
{
+return new InjectableElement() {
+@Override
+public AnnotatedElement getAnnotatedElement() {
+return element.getAnnotatedElement();
+}
+
+@Override
+public Type getType() {
+return type;
+}
+
+@Override
+public boolean isPrimitive() {
+return element.isPrimitive();
+}
+
+@Override
+public String getName() {
+return element.getName();
+}
+
+@Override
+public String getSource() {
+return element.getSource();
+}
+
+@Override
+public String getVia() {
+return element.getVia();
+}
+
+@Override
+public Class getViaProviderType() {
+return element.getViaProviderType();
+}
+
+@Override
+public boolean hasDefaultValue() {
+return element.hasDefaultValue();
+}
+
+@Override
+public Object getDefaultValue() {
+return element.getDefaultValue() == null ? Optional.empty() : 
element.getDefaultValue();
+}
+
+@Override
+public boolean isOptional(InjectAnnotationProcessor 
annotationProcessor) {
+return true;
+}
+};
+}
+
 private
 @Nullable
 RuntimeException injectElement(final InjectableElement element, final 
Object adaptable,
final @NotNull DisposalCallbackRegistry 
registry, final InjectCallback callback,
final @NotNull Map 
preparedValues,
final @Nullable BundleContext modelContext) 
{
+if (element instanceof InjectableField) {
+Type genericType = ((InjectableField) 
element).getFieldGenericType();
+
+if (genericType instanceof ParameterizedType) {
+ParameterizedType pType = (ParameterizedType) genericType;
+
+if (pType.getRawType().equals(Optional.class)) {
+InjectableElement el = getElement(element, 
pType.getActualTypeArguments()[0]);
+
+return injectElementInternal(el, adaptable, registry, new 
InjectCallback() {
+@Override
+public RuntimeException inject(InjectableElement 
element1, Object value) {
+return callback.inject(element, 
value.equals(Optional.empty())
+? value
+: Optional.of(value));

Review comment:
   This part is perplexing me. Why would you wrap the value in 
`Optional.of(..)` only when the parameter `value` is not an empty optional?.
   
   To me, this seems like it should be more like this:
   ```suggestion
   return callback.inject(element1, 
Optional.ofNullable(value));
   ```

##
File path: src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
##
@@ -495,12 +480,97 @@ public RuntimeException inject(InjectableElement element, 
Object value) {
 }
 }
 
+@NotNull
+private InjectableElement getElement(InjectableElement element, Type type) 
{
+return new InjectableElement() {
+@Override
+public AnnotatedElement getAnnotatedElement() {
+return element.getAnnotatedElement();
+}
+
+@Override
+public Type getType() {
+return type;
+}
+
+@Override
+public boolean isPrimitive() {
+return element.isPrimitive();
+}
+
+@Override
+public String getName() {
+return element.getName();
+}
+
+@Override
+public String getSource() {
+return element.getSource();
+}
+
+@Override
+public String getVia() {
+return element.getVia();
+}
+
+@Override
+public Class getViaProviderType() {
+return element.getViaProviderType();
+}
+
+@Override
+public boolean hasDefaultValue() {
+return element.hasDefaultValue();
+}
+
+@Override
+public Object 

[jira] [Resolved] (SLING-9541) add filter pipe capability on child count

2020-06-22 Thread Nicolas Peltier (Jira)


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

Nicolas Peltier resolved SLING-9541.

Fix Version/s: Pipes 3.2.0
   Resolution: Fixed

> add filter pipe capability on child count
> -
>
> Key: SLING-9541
> URL: https://issues.apache.org/jira/browse/SLING-9541
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions
>Affects Versions: Pipes 3.2.0
>Reporter: Nicolas Peltier
>Priority: Minor
> Fix For: Pipes 3.2.0
>
>
> add the possibility to do count test on filter pipe



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


[jira] [Resolved] (SLING-9540) Shallow Reference pipe

2020-06-22 Thread Nicolas Peltier (Jira)


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

Nicolas Peltier resolved SLING-9540.

Fix Version/s: Pipes 3.2.0
   Resolution: Fixed

> Shallow Reference pipe
> --
>
> Key: SLING-9540
> URL: https://issues.apache.org/jira/browse/SLING-9540
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions
>Affects Versions: Pipes 3.2.0
>Reporter: Nicolas Peltier
>Priority: Major
> Fix For: Pipes 3.2.0
>
>
> we need a pipe that does a reference to another that will not be calling 
> itself: in case a complex dynamic pipe is calling pipes depending on 
> resources, and reference pipe is used, this can ends up being an infinite 
> loop.



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


[jira] [Commented] (SLING-8706) Injections for java.util.Optional<> should be automatic optional

2020-06-22 Thread Justin Edelson (Jira)


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

Justin Edelson commented on SLING-8706:
---

The question of how HTL interprets methods which return {{Optional}} should 
really be orthogonal. Whether or not Sling Models supports *injection* of 
{{Optional}} fields has no bearing on the API exposed by a model class. One 
could have a Sling Model class *today* used by HTL which had a method which 
returned an {{Optional}} value.

I don't see why the lack of serialization support is a problem, for two reasons 
-- one, I'm not sure how common is it to use Java serialization for model 
classes, second, this is (no pun intended) an _optional_ feature so worst case 
a model developer would need to make a choice between using Java serialization 
and this method for optional field injection. While yes, {{Optional}} wasn't 
intended to be used in this way, I see no documentation that its usage as a 
field is *prohibited*.

> Injections for java.util.Optional<> should be automatic optional 
> -
>
> Key: SLING-8706
> URL: https://issues.apache.org/jira/browse/SLING-8706
> Project: Sling
>  Issue Type: Improvement
>  Components: Sling Models
>Reporter: Jörg Hoh
>Priority: Major
>  Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> The current approach to support optional injections requires to annotate the 
> field with {{@Optional}} plus proper handling within the javacode (null 
> checks etc), which can be forgotten.
> So instead of
> {code}
> @Inject @Optional
> String fieldname;
> {code}
> it should also be possible to use this
> {code}
> @Inject
> Optional fieldname;
> {code}
> with the very same semantic. But the developer is forced to deal with the 
> case that the value is not present.



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


[GitHub] [sling-org-apache-sling-models-impl] justinedelson commented on a change in pull request #17: SLING-8706 - Injections for java.util.Optional<> should be automatically optional

2020-06-22 Thread GitBox


justinedelson commented on a change in pull request #17:
URL: 
https://github.com/apache/sling-org-apache-sling-models-impl/pull/17#discussion_r443608867



##
File path: src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
##
@@ -495,12 +480,97 @@ public RuntimeException inject(InjectableElement element, 
Object value) {
 }
 }
 
+@NotNull
+private InjectableElement getElement(InjectableElement element, Type type) 
{

Review comment:
   IIUC, this method is not named intuitively. It should be something like 
`getOptionalTypeElement` or something like that.
   
   It also might be best to move this logic to the constructor of 
`InjectableField` or at least move this anonymous inner class to a new class 
named `OptionalTypedInjectableField` (or something like that since `Optional` 
is now a bit ambiguous).





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

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




[GitHub] [sling-org-apache-sling-junit-core] bdelacretaz merged pull request #3: SLING-9542, Unable to use junit categories with sling junit core

2020-06-22 Thread GitBox


bdelacretaz merged pull request #3:
URL: https://github.com/apache/sling-org-apache-sling-junit-core/pull/3


   



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

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




[GitHub] [sling-org-apache-sling-junit-core] bdelacretaz commented on pull request #3: SLING-9542, Unable to use junit categories with sling junit core

2020-06-22 Thread GitBox


bdelacretaz commented on pull request #3:
URL: 
https://github.com/apache/sling-org-apache-sling-junit-core/pull/3#issuecomment-647559020


   I don't have a way to test this myself but it looks reasonable, merging this 
PR, thank you!



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: Deprecated org.apache.sling.servlets.post.AbstractPostOperation

2020-06-22 Thread Bertrand Delacretaz
On Mon, Jun 22, 2020 at 2:36 PM Carlos Munoz  wrote:
> ...My suggestion would be to add this
> solution you just proposed to the javadocs of those deprecated classes...

Good idea  - let's wait until you confirm that it works for you and
this sounds like a plan!

-Bertrand


[jira] [Commented] (SLING-8706) Injections for java.util.Optional<> should be automatic optional

2020-06-22 Thread Jira


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

Jörg Hoh commented on SLING-8706:
-

[~jmanuelbr] Using Java Optionals would be just another way to express the 
fact, that a certain field might not be present. You still can change the 
overall strategy or annotate any field individually with {{@Optional}}, the 
current behavior and the way annotations are working must not change.

> Injections for java.util.Optional<> should be automatic optional 
> -
>
> Key: SLING-8706
> URL: https://issues.apache.org/jira/browse/SLING-8706
> Project: Sling
>  Issue Type: Improvement
>  Components: Sling Models
>Reporter: Jörg Hoh
>Priority: Major
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> The current approach to support optional injections requires to annotate the 
> field with {{@Optional}} plus proper handling within the javacode (null 
> checks etc), which can be forgotten.
> So instead of
> {code}
> @Inject @Optional
> String fieldname;
> {code}
> it should also be possible to use this
> {code}
> @Inject
> Optional fieldname;
> {code}
> with the very same semantic. But the developer is forced to deal with the 
> case that the value is not present.



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


[GitHub] [sling-org-apache-sling-junit-core] nitin-nizhawan opened a new pull request #3: SLING-9542, Unable to use junit categories with sling junit core

2020-06-22 Thread GitBox


nitin-nizhawan opened a new pull request #3:
URL: https://github.com/apache/sling-org-apache-sling-junit-core/pull/3


 - export org.junit.experimental.categories.* and
   org.junit.validator.*



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

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




[jira] [Created] (SLING-9542) Unable to use junit categories with sling junit core

2020-06-22 Thread Nitin Nizhawan (Jira)
Nitin Nizhawan created SLING-9542:
-

 Summary: Unable to use junit categories with sling junit core 
 Key: SLING-9542
 URL: https://issues.apache.org/jira/browse/SLING-9542
 Project: Sling
  Issue Type: Bug
  Components: JUnit Core
Reporter: Nitin Nizhawan


Sling Junit core embeds JUnit and exports JUnit packages. These junit packages 
are imported by test case bundles created by teleporter.  If however, test 
cases use junit categories to filter tests then such tests to not work. 

This is because sling junit core exports only some junit package. Specifically, 
it does not export org.junit.experimental.categories and org.junit.validator



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


[jira] [Created] (SLING-9541) add filter pipe capability on child count

2020-06-22 Thread Nicolas Peltier (Jira)
Nicolas Peltier created SLING-9541:
--

 Summary: add filter pipe capability on child count
 Key: SLING-9541
 URL: https://issues.apache.org/jira/browse/SLING-9541
 Project: Sling
  Issue Type: Improvement
  Components: Extensions
Affects Versions: Pipes 3.2.0
Reporter: Nicolas Peltier


add the possibility to do count test on filter pipe



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


[jira] [Created] (SLING-9540) Shallow Reference pipe

2020-06-22 Thread Nicolas Peltier (Jira)
Nicolas Peltier created SLING-9540:
--

 Summary: Shallow Reference pipe
 Key: SLING-9540
 URL: https://issues.apache.org/jira/browse/SLING-9540
 Project: Sling
  Issue Type: Improvement
  Components: Extensions
Affects Versions: Pipes 3.2.0
Reporter: Nicolas Peltier


we need a pipe that does a reference to another that will not be calling 
itself: in case a complex dynamic pipe is calling pipes depending on resources, 
and reference pipe is used, this can ends up being an infinite loop.



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


[jira] [Commented] (SLING-8706) Injections for java.util.Optional<> should be automatic optional

2020-06-22 Thread Jose Berciano (Jira)


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

Jose Berciano commented on SLING-8706:
--

Hi [~joerghoh], just curious how would you go about defining optional as 
default injection strategy?
E.g.
{code:java}
@Model(adaptables = Resource.class, defaultInjectionStrategy = 
DefaultInjectionStrategy.OPTIONAL) 
public class SomeModel {
{code}
Would this require to implement all class attributes as optional? And if not 
compilation error?

 

> Injections for java.util.Optional<> should be automatic optional 
> -
>
> Key: SLING-8706
> URL: https://issues.apache.org/jira/browse/SLING-8706
> Project: Sling
>  Issue Type: Improvement
>  Components: Sling Models
>Reporter: Jörg Hoh
>Priority: Major
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> The current approach to support optional injections requires to annotate the 
> field with {{@Optional}} plus proper handling within the javacode (null 
> checks etc), which can be forgotten.
> So instead of
> {code}
> @Inject @Optional
> String fieldname;
> {code}
> it should also be possible to use this
> {code}
> @Inject
> Optional fieldname;
> {code}
> with the very same semantic. But the developer is forced to deal with the 
> case that the value is not present.



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


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

2020-06-22 Thread Apache Jenkins Server
] [ServiceReference 149 from bundle 61 : 
org.apache.sling.launchpad.test-services:12.0.0.SNAPSHOT 
ref=[javax.servlet.Servlet] properties={component.id=52, 
component.name=org.apache.sling.launchpad.testservices.servlets.R6WhiteboardServlet,
 objectClass=[javax.servlet.Servlet], 
osgi.http.whiteboard.context.select=(osgi.http.whiteboard.context.name=org.apache.sling),
 osgi.http.whiteboard.servlet.pattern=/whiteboard_r6, service.bundleid=61, 
service.id=149, 
service.pid=org.apache.sling.launchpad.testservices.servlets.R6WhiteboardServlet,
 service.scope=bundle, service.vendor=The Apache Software Foundation}] Ignoring 
unmatching Servlet service
[DEBUG] [ServiceReference 374 from bundle 142 : org.apache.sling.engine:2.7.2 
ref=[javax.servlet.Filter] properties={component.id=255, 
component.name=org.apache.sling.engine.parameters, file.max=-1, 
file.threshold=256000, objectClass=[javax.servlet.Filter], 
osgi.http.whiteboard.context.select=(osgi.http.whiteboard.context.name=org.apache.sling),
 osgi.http.whiteboard.filter.pattern=[/], request.max=-1, service.bundleid=142, 
service.description=Filter for request parameter support, service.id=374, 
service.ranking=2147483647, service.scope=bundle, service.vendor=The Apache 
Software Foundation, sling.default.max.parameters=1, 
sling.default.parameter.checkForAdditionalContainerParameters=false, 
sling.default.parameter.encoding=ISO-8859-1}] Ignoring unmatching Filter service
[DEBUG] [ServiceReference 590 from bundle 142 : org.apache.sling.engine:2.7.2 
ref=[javax.servlet.Filter] properties={component.id=254, 
component.name=org.apache.sling.engine.impl.log.RequestLoggerFilter, 
objectClass=[javax.servlet.Filter], 
osgi.http.whiteboard.context.select=(osgi.http.whiteboard.context.name=org.apache.sling),
 osgi.http.whiteboard.filter.pattern=[/], service.bundleid=142, 
service.description=Request Logger Filter, service.id=590, 
service.ranking=32768, service.scope=bundle, service.vendor=The Apache Software 
Foundation}] Ignoring unmatching Filter service
[INFO] Apachde Felix Http Whiteboard Service stopped
[DEBUG] [ServiceReference 1279 from bundle 41 : 
org.apache.felix.healthcheck.core:2.0.6 ref=[javax.servlet.Servlet] 
properties={objectClass=[javax.servlet.Servlet], 
osgi.http.whiteboard.context.select=(osgi.http.whiteboard.context.name=internal.http.serviceunavailablefilter),
 osgi.http.whiteboard.servlet.pattern=/, service.bundleid=41, service.id=1279, 
service.ranking=0, service.scope=singleton}] Ignoring unmatching Servlet service
[INFO] Stopped Jetty.
22.06.2020 13:32:13.407 *INFO * [Sling Notifier] Apache Sling has been stopped
[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] 7 resources included (use -debug for more details)
[INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 
approved: 6 licence.
[INFO] 
[INFO] --- maven-failsafe-plugin:2.21.0:verify (default) @ 
org.apache.sling.launchpad.testing ---
[INFO] 
[INFO] BUILD FAILURE
[INFO] 
[INFO] Total time:  03:52 min
[INFO] Finished at: 2020-06-22T13:32:15Z
[INFO] 
[INFO] [jenkins-event-spy] Generated 
/home/jenkins/jenkins-slave/workspace/e-sling-launchpad-testing_master@tmp/withMavena8351c5e/maven-spy-20200622-132822-776769461642083444761.log
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-failsafe-plugin:2.21.0:verify (default

[jira] [Closed] (SLING-9150) Replace similar methods from JspUtil with calls to JavaEscapeHelper

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9150.
-

> Replace similar methods from JspUtil with calls to JavaEscapeHelper
> ---
>
> Key: SLING-9150
> URL: https://issues.apache.org/jira/browse/SLING-9150
> Project: Sling
>  Issue Type: Sub-task
>  Components: Scripting
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting JSP 2.5.0
>
>
> Some of the {{org.apache.sling.scripting.jsp.jasper.compiler.JspUtil}} 
> methods should be removed and replaced with their equivalents from 
> {{org.apache.sling.commons.compiler.source.JavaEscapeHelper}}.



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


[jira] [Closed] (SLING-9379) Make the MetadataMojo look for scripts in the default locations

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9379.
-

> Make the MetadataMojo look for scripts in the default locations
> ---
>
> Key: SLING-9379
> URL: https://issues.apache.org/jira/browse/SLING-9379
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting Bundle Maven Plugin 0.2.0
>
>
> The {{MetadataMojo}} uses the {{src/main/scripts}} folder as the default 
> value for the folder where it will scan for Sling scripts, however this is 
> the default folder for scripts that normally will be precompiled. It would be 
> nice if the mojo would also try to scan {{src/main/resources/javax.script}}, 
> in order to reduce the configuration a developer must provide for generating 
> capabilities for bundled scripts.
> In addition to that, the configuration should allow multiple source folders 
> to be defined, so that bundles can provide both precompiled scripts and 
> bundled scripts at the same time.



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


[jira] [Closed] (SLING-9209) Report which requirements are not directly satisfied by the current project

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9209.
-

> Report which requirements are not directly satisfied by the current project
> ---
>
> Key: SLING-9209
> URL: https://issues.apache.org/jira/browse/SLING-9209
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting Bundle Maven Plugin 0.2.0
>
>
> When the {{MetadataMojo}} executes it would help to see which required 
> resource types (capabilities) are not provided by the current project and 
> report them.



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


[jira] [Closed] (SLING-9228) Export the name of the System property which is used by the Jasper compiler to set the default package name for generated classes

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9228.
-

> Export the name of the System property which is used by the Jasper compiler 
> to set the default package name for generated classes
> -
>
> Key: SLING-9228
> URL: https://issues.apache.org/jira/browse/SLING-9228
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting JSP 2.5.0
>
>
> The Jasper compiler reads the default package name used for generating Java 
> classes from JSP files from the 
> {{org.apache.sling.scripting.jsp.jasper.Constants#JSP_PACKAGE_NAME}} 
> constant. The constant is initialised by reading the 
> {{org.apache.sling.scripting.jsp.jasper.Constants.JSP_PACKAGE_NAME}} system 
> property, however the name of this property is hardcoded.
> In order to allow callers of the JSP compiler to set the default package 
> name, the 
> {{org.apache.sling.scripting.jsp.jasper.Constants.JSP_PACKAGE_NAME}} system 
> property name should also be exposed through a constant.



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


[jira] [Closed] (SLING-9335) Capabilities based on the extends file should be merged with capabilities based on resource label scripts

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9335.
-

> Capabilities based on the extends file should be merged with capabilities 
> based on resource label scripts
> -
>
> Key: SLING-9335
> URL: https://issues.apache.org/jira/browse/SLING-9335
> Project: Sling
>  Issue Type: Bug
>  Components: Maven Plugins and Archetypes
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting Bundle Maven Plugin 0.2.0
>
>
> Currently a capability generated from an {{extends}} file will co-exist with 
> a capability generated from a resource label script, leading to issues at 
> runtime when it comes to finding the correct executable which has to handle a 
> certain resource type. As such, these capabilities should be merged 
> automatically by the plugin, before generating the values for the bundle's 
> manifest.



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


[jira] [Closed] (SLING-9206) Add support for executing precompiled JSP scripts

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9206.
-

> Add support for executing precompiled JSP scripts
> -
>
> Key: SLING-9206
> URL: https://issues.apache.org/jira/browse/SLING-9206
> Project: Sling
>  Issue Type: New Feature
>  Components: Scripting
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting JSP 2.5.0
>
>  Time Spent: 4h
>  Remaining Estimate: 0h
>
> The JSP Scripting Engine should be enhanced to execute precompiled bundled 
> JSPs if the Apache Sling Scripting Bundle Tracker module [0] is present on 
> the platform.
> [0] - 
> https://github.com/apache/sling-org-apache-sling-scripting-bundle-tracker



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


[jira] [Closed] (SLING-9208) Generate provide capabilities based on the search paths

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9208.
-

> Generate provide capabilities based on the search paths
> ---
>
> Key: SLING-9208
> URL: https://issues.apache.org/jira/browse/SLING-9208
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Affects Versions: Scripting Bundle Maven Plugin 0.1.0
>Reporter: Karl Pauls
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting Bundle Maven Plugin 0.2.0
>
>
> If a resource type is generated from a folder contained in a search path, the 
> provide capability should generate two resource types: an absolute one and a 
> relative one (relative to the search path).



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


[jira] [Closed] (SLING-9264) Add the original script extension to the provided capabilities

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9264.
-

> Add the original script extension to the provided capabilities
> --
>
> Key: SLING-9264
> URL: https://issues.apache.org/jira/browse/SLING-9264
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting Bundle Maven Plugin 0.2.0
>
>
> If the capabilities would provide the original script extension, the 
> {{org.apache.sling.scripting.bundle.tracker.internal.BundledScriptFinder}} 
> script resolution could be  performed when wired bundles come in, rather than 
> when the first request hits a registered servlet.



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


[jira] [Closed] (SLING-9161) The Scripting Bundle Maven Plugin should allow more flexible ways for the project structure

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9161.
-

> The Scripting Bundle Maven Plugin should allow more flexible ways for the 
> project structure
> ---
>
> Key: SLING-9161
> URL: https://issues.apache.org/jira/browse/SLING-9161
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Affects Versions: Scripting Bundle Maven Plugin 0.1.0
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting Bundle Maven Plugin 0.2.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> The Scripting Bundle Maven Plugin currently imposes the following restriction 
> for the project structure:
> {noformat}
> ///[.][.][.].
> {noformat}
> In this case the {{}} will be limited to one folder, 
> which means that resource  type namespacing should be done similar to Java 
> package names. While this is not wrong, the plugin should also allow defining 
> the resource types using Sling's already established conventions [0], e.g. 
> resource tree paths relative to a search path. In addition, the {{}} 
> folder should become optional.
> [0] - 
> https://sling.apache.org/documentation/the-sling-engine/url-to-script-resolution.html#scripts-for-get-requests



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


[jira] [Closed] (SLING-9527) Add a proper documentation page for the Scripting Bundle Maven Plugin

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9527.
-

> Add a proper documentation page for the Scripting Bundle Maven Plugin
> -
>
> Key: SLING-9527
> URL: https://issues.apache.org/jira/browse/SLING-9527
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting Bundle Maven Plugin 0.2.0
>
>
> The Scripting Bundle Maven Plugin should provide a regular Maven Plugin 
> documentation page.



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


[jira] [Closed] (SLING-9394) html scripts should be used to generate the resource type

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9394.
-

> html scripts should be used to generate the resource type
> -
>
> Key: SLING-9394
> URL: https://issues.apache.org/jira/browse/SLING-9394
> Project: Sling
>  Issue Type: Bug
>  Components: Maven Plugins and Archetypes
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting Bundle Maven Plugin 0.2.0
>
>
> {{html.*}} scripts should be used to generate the resource type, given 
> Sling's servlet resolution algorithms.



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


[jira] [Closed] (SLING-9306) Provide a path capability for scripts which are not part of a resource type

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9306.
-

> Provide a path capability for scripts which are not part of a resource type
> ---
>
> Key: SLING-9306
> URL: https://issues.apache.org/jira/browse/SLING-9306
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes, Scripting
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting Bundle Tracker 0.2.0, Scripting Bundle Maven 
> Plugin 0.2.0
>
>
> For scripts that are not part of a resource type a path capability should be 
> generated, so that the {{BundledScriptTracker}} can register a path servlet.



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


[jira] [Closed] (SLING-9183) The Scripting Bundle Maven Plugin should add the Script Engine short name for each provided resource type capability

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9183.
-

> The Scripting Bundle Maven Plugin should add the Script Engine short name for 
> each provided resource type capability
> 
>
> Key: SLING-9183
> URL: https://issues.apache.org/jira/browse/SLING-9183
> Project: Sling
>  Issue Type: Bug
>  Components: Maven Plugins and Archetypes
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting Bundle Maven Plugin 0.2.0
>
>
> The Scripting Bundle Maven Plugin should add the Script Engine short name for 
> each provided resource type capability. This should be done based on the 
> extension of each script in the Maven project. By default, the plugin should 
> provide its default mapping, but the mapping should be configurable, in case 
> multiple script engines can handle the same extensions.



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


[jira] [Closed] (SLING-9197) Align script file name analysis to the Sling conventions

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9197.
-

> Align script file name analysis to the Sling conventions
> 
>
> Key: SLING-9197
> URL: https://issues.apache.org/jira/browse/SLING-9197
> Project: Sling
>  Issue Type: Bug
>  Components: Maven Plugins and Archetypes
>Affects Versions: Scripting Bundle Maven Plugin 0.1.0
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting Bundle Maven Plugin 0.2.0
>
>
> The Sling documentation didn't define all conventions for script names until 
> SLING-9194. Given this information, the {{MetadataMojo}} should be refactored 
> to correctly handle scripts specific to HTTP methods.



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


[jira] [Closed] (SLING-9201) Files in nested resource tree folders should only be analysed in the context of the closest resource type

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9201.
-

> Files in nested resource tree folders should only be analysed in the context 
> of the closest resource type
> -
>
> Key: SLING-9201
> URL: https://issues.apache.org/jira/browse/SLING-9201
> Project: Sling
>  Issue Type: Bug
>  Components: Maven Plugins and Archetypes
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting Bundle Maven Plugin 0.2.0
>
>
> Files in nested resource tree folders should only be analysed in the context 
> of the closest resource type, otherwise they might generate wrong 
> capabilities.
> Example:
> {noformat}
> sling/
> components/
> a/
> a.html
> b/
> c/
> c.html
> d.html
> {noformat}
> In this setup the following resource types should be defined:
> # sling/components/a with selectors b.d
> # sling/components/a/b/c



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


[jira] [Closed] (SLING-9346) Skip files for which a script engine mapping doesn't exist

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9346.
-

> Skip files for which a script engine mapping doesn't exist
> --
>
> Key: SLING-9346
> URL: https://issues.apache.org/jira/browse/SLING-9346
> Project: Sling
>  Issue Type: Bug
>  Components: Maven Plugins and Archetypes
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting Bundle Maven Plugin 0.2.0
>
>
> The Scripting Bundle Maven Plugin should skip files for which a script engine 
> mapping doesn't exist and analyse only {{requires}}, {{extends}} and files 
> with extensions covered by a mapping.



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


[jira] [Closed] (SLING-9338) Allow defining an exclusion list accepting folders or files

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9338.
-

> Allow defining an exclusion list accepting folders or files
> ---
>
> Key: SLING-9338
> URL: https://issues.apache.org/jira/browse/SLING-9338
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting Bundle Maven Plugin 0.2.0
>
>
> The Scripting Bundle Maven Plugin should allow defining an exclusion list 
> which accepts folders, files or patterns. The exclusion list would allow 
> skipping defining capabilities for scripts which are just included by other 
> scripts (e.g. the JSP {{include}} directive) and as such should not generate 
> a capability.



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


[jira] [Closed] (SLING-9193) Change the default folder for scripts lookup

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9193.
-

> Change the default folder for scripts lookup
> 
>
> Key: SLING-9193
> URL: https://issues.apache.org/jira/browse/SLING-9193
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Affects Versions: Scripting Bundle Maven Plugin 0.1.0
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting Bundle Maven Plugin 0.2.0
>
>
> The default folder where the Scripting Bundle Maven Plugin expect scripts to 
> be located should be changed to {{$\{project.build.scriptSourceDirectory\}}}, 
> which is the default scripts source directory according to the super pom [0]. 
> By default this expands to {{$\{project.basedir\}/src/main/scripts}}.
> [0] - https://maven.apache.org/pom.html#The_Super_POM



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


[jira] [Closed] (SLING-9135) Move org.apache.sling.scripting.sightly.java.compiler.JavaEscapeUtils into org.apache.sling.commons.compiler

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9135.
-

> Move org.apache.sling.scripting.sightly.java.compiler.JavaEscapeUtils into 
> org.apache.sling.commons.compiler
> 
>
> Key: SLING-9135
> URL: https://issues.apache.org/jira/browse/SLING-9135
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Commons Compiler 2.4.0
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The {{org.apache.sling.scripting.sightly.java.compiler.JavaEscapeUtils}} 
> class, which borrows some methods from 
> {{org.apache.sling.scripting.jsp.jasper.compiler.JspUtil}}, should be 
> extracted into a more lightweight bundle, like 
> {{org.apache.sling.commons.compiler}}, to improve its reuse potential.



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


[jira] [Closed] (SLING-9145) Upgrade to parent pom 38

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9145.
-

> Upgrade to parent pom 38
> 
>
> Key: SLING-9145
> URL: https://issues.apache.org/jira/browse/SLING-9145
> Project: Sling
>  Issue Type: Sub-task
>  Components: Commons
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Commons Compiler 2.4.0
>
>
> The {{org.apache.sling.commons.compiler}} project uses Sling parent version 
> 30. By upgrading to {{sling-bundle-parent}} 38 we could remove a lot of 
> redundant information provided in the {{org.apache.sling.commons.compiler}}'s 
> pom and we would also allow building this module with Java 11.



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


[jira] [Closed] (SLING-8022) Compiler should inline ecj

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-8022.
-

> Compiler should inline ecj 
> ---
>
> Key: SLING-8022
> URL: https://issues.apache.org/jira/browse/SLING-8022
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Affects Versions: Commons Compiler 2.3.6
>Reporter: Karl Pauls
>Assignee: Karl Pauls
>Priority: Minor
> Fix For: Commons Compiler 2.4.0
>
>
> The compiler should inline the ecj dependency to avoid having it extracted at 
> runtime.



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


[jira] [Closed] (SLING-8322) Upgrade to version of ECJ that supports Java 11

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-8322.
-

> Upgrade to version of ECJ that supports Java 11
> ---
>
> Key: SLING-8322
> URL: https://issues.apache.org/jira/browse/SLING-8322
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Robert Munteanu
>Assignee: Robert Munteanu
>Priority: Major
> Fix For: Commons Compiler 2.4.0
>
>




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


[jira] [Closed] (SLING-9348) ResourceCollector is not weighing scripts with a method in the name correctly

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9348.
-

> ResourceCollector is not weighing scripts with a method in the name correctly
> -
>
> Key: SLING-9348
> URL: https://issues.apache.org/jira/browse/SLING-9348
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Servlets Resolver 2.6.4
>Reporter: Karl Pauls
>Assignee: Karl Pauls
>Priority: Major
> Fix For: Servlets Resolver 2.7.0
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The ResourceCollector that creates the weighted resources for script 
> selection is giving equal priority to scripts that have the method in their 
> path and those that don't. E.g.:
> foo/html.servlet and foo/html.GET.servlet will have the same weight. 
> That is wrong as the one with the GET should have preference.



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


[jira] [Closed] (SLING-9520) Expose the script name in the BundledScriptServlet

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9520.
-

> Expose the script name in the BundledScriptServlet
> --
>
> Key: SLING-9520
> URL: https://issues.apache.org/jira/browse/SLING-9520
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Servlets Resolver 2.7.0
>
>
> The 
> {{org.apache.sling.servlets.resolver.bundle.tracker.internal.BundledScriptServlet}}
>  should expose the script name on behalf of which the rendering is performed. 
> This should be exposed in a similar way to the 
> {{org.apache.sling.scripting.core.impl.DefaultSlingScript#getServletInfo}}.



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


[jira] [Closed] (SLING-9365) Optionally don't create resource providers for servlets

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9365.
-

> Optionally don't create resource providers for servlets
> ---
>
> Key: SLING-9365
> URL: https://issues.apache.org/jira/browse/SLING-9365
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Affects Versions: Servlets Resolver 2.6.4
>Reporter: Karl Pauls
>Assignee: Karl Pauls
>Priority: Major
> Fix For: Servlets Resolver 2.7.0
>
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> The current ServletMounter creates a resource provider for each registered 
> servlet. That works fine for a given amount of servlets but can become 
> problematic for a high number of servlets as it means that on the one hand, 
> the number of services is doubled and on the other hand, a lot of 
> notifications are send out as well as a lot of computation has to be done by 
> the resource resolver. 
> As an optional remedy for these kinds of scenarios, we should allow to 
> configure the mounter to not provide resource providers for servlets but only 
> decorate resources into the content tree.



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


[jira] [Closed] (SLING-9055) Implement a new SlingServletPathsStrict annotation

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9055.
-

> Implement a new SlingServletPathsStrict annotation
> --
>
> Key: SLING-9055
> URL: https://issues.apache.org/jira/browse/SLING-9055
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Affects Versions: Sling Servlet Annotations 1.2.4
>Reporter: Bertrand Delacretaz
>Assignee: Bertrand Delacretaz
>Priority: Minor
> Fix For: Sling Servlet Annotations 1.2.6, Servlets Resolver 2.7.0
>
>
> We need a new annotation to use the new {{sling.servlet.paths.strict}} mode 
> introduced by SLING-8110, allowing to specify the extension, selectors and 
> methods (all optional) that this mode takes into account.
> As discussed on the Sling dev list, this annotation should use a 
> {{@Requirement}} meta-annotation [1] to generate an OSGi requirement for the 
> version of the 
> {{o.a.s.servlets.resolver}} bundle which includes this functionality.
> [1] 
> https://osgi.org/specification/osgi.core/7.0.0/framework.api.html#org.osgi.annotation.bundle.Requirement



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


[jira] [Closed] (SLING-9475) Do not register servlets using the default methods for bundled scripts

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9475.
-

> Do not register servlets using the default methods for bundled scripts
> --
>
> Key: SLING-9475
> URL: https://issues.apache.org/jira/browse/SLING-9475
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Servlets Resolver 2.7.0
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The 
> {{org.apache.sling.servlets.resolver.bundle.tracker.internal.BundledScriptTracker}}
>  should not allow servlets registered on the default methods for bundled 
> scripts if the capabilities don't explicitly define their own HTTP methods; 
> otherwise the registered servlets override the Default GET Servlet.



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


[jira] [Closed] (SLING-9222) Support requiring empty extensions or selectors in paths.strict mode

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9222.
-

> Support requiring empty extensions or selectors in paths.strict mode
> 
>
> Key: SLING-9222
> URL: https://issues.apache.org/jira/browse/SLING-9222
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Affects Versions: Servlets Resolver 2.6.4
>Reporter: Bertrand Delacretaz
>Assignee: Bertrand Delacretaz
>Priority: Minor
> Fix For: Servlets Resolver 2.7.0
>
>
> The SLING-8110 {{sling.servlets.paths.strict}} mode should support requiring 
> an empty set of selectors or and empty extension for a path-based servlet to 
> be selected.
> I'll implement this using a special {{.EMPTY.}} value for the 
> {{sling.servlet.selectors}} and {{sling.servlet.extensions}} properties, 
> which indicates that the servlet is only selected if the corresponding value 
> is empty.



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


[jira] [Closed] (SLING-9459) PathBasedServletAcceptor ERROR log about SlingServletConfig should be DEBUG

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9459.
-

> PathBasedServletAcceptor ERROR log about SlingServletConfig should be DEBUG
> ---
>
> Key: SLING-9459
> URL: https://issues.apache.org/jira/browse/SLING-9459
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Affects Versions: Servlets Resolver 2.6.4
>Reporter: Bertrand Delacretaz
>Assignee: Bertrand Delacretaz
>Priority: Minor
> Fix For: Servlets Resolver 2.7.0
>
>
> We're seeing many ERROR logs like this one in a Sling-based app:
> {code}
> org.apache.sling.servlets.resolver.internal.PathBasedServletAcceptor
> Did not get a SlingServletConfig for 
> /libs/com/example/somescript.jsp
>  {code}
> The {{PathBasedServletAcceptor}} does get configs which are not 
> {{SlingServletConfig}} when a script (as opposed to a Servlet) is being 
> executed.
> That log message should be DEBUG to avoid the unnecessary noise.



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


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

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9291.
-

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




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


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

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9285.
-

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




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


[jira] [Closed] (SLING-9352) Remove search patch restriction from the ScriptCacheImpl

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9352.
-

> Remove search patch restriction from the ScriptCacheImpl
> 
>
> Key: SLING-9352
> URL: https://issues.apache.org/jira/browse/SLING-9352
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Affects Versions: Scripting Core 2.0.32
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting Core 2.3.0
>
>
> This issue essentially reverts SLING-4936, such that the {{ScriptCacheImpl}} 
> can also be used with bundled scripts. The callers of the API should be the 
> ones responsible for storing the scripts with unique keys - paths / URLs that 
> they fully control.



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


[jira] [Closed] (SLING-9149) Switch from JavaEscapeUtils to JavaEscapeHelper

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9149.
-

> Switch from JavaEscapeUtils to JavaEscapeHelper
> ---
>
> Key: SLING-9149
> URL: https://issues.apache.org/jira/browse/SLING-9149
> Project: Sling
>  Issue Type: Sub-task
>  Components: Maven Plugins and Archetypes
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: HTL Maven Plugin 2.0.0-1.4.0
>
>
> Since {{org.apache.sling.scripting.sightly.java.compiler.JavaEscapeUtils}} 
> was deprecated, it's better to switch to the 
> {{org.apache.sling.commons.compiler.source.JavaEscapeHelper}} class provided 
> by the Commons Compiler module.



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


[jira] [Closed] (SLING-9196) Provide flag which allows the htl-maven-plugin to not fail a build

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9196.
-

> Provide flag which allows the htl-maven-plugin to not fail a build
> --
>
> Key: SLING-9196
> URL: https://issues.apache.org/jira/browse/SLING-9196
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: HTL Maven Plugin 2.0.0-1.4.0
>
>
> The {{htl-maven-plugin}} can be used to validate and generate Java classes 
> from HTL scripts. A useful feature would be to have a flag that allows it to 
> report all warnings and errors without failing the Maven build.



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


[jira] [Closed] (SLING-8899) Use the inherited version of the maven-plugin-plugin

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-8899.
-

> Use the inherited version of the maven-plugin-plugin
> 
>
> Key: SLING-8899
> URL: https://issues.apache.org/jira/browse/SLING-8899
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: HTL Maven Plugin 2.0.0-1.4.0
>
>
> The {{htl-maven-plugin}} currently overrides the version of the used 
> {{maven-plugin-plugin}} to 3.4, which leads to issues when generating the 
> plugin's reports. The ASF parent already uses a newer version which doesn't 
> exhibit these problems.



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


[jira] [Closed] (SLING-9191) Change the default folder for scripts lookup

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9191.
-

> Change the default folder for scripts lookup
> 
>
> Key: SLING-9191
> URL: https://issues.apache.org/jira/browse/SLING-9191
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Affects Versions: HTL Maven Plugin 1.0.0, HTL Maven Plugin 1.1.0, HTL 
> Maven Plugin 1.2.0-1.4.0, HTL Maven Plugin 1.3.0-1.4.0
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: HTL Maven Plugin 2.0.0-1.4.0
>
>
> The default folder where the HTL Maven Plugin expects scripts to be located 
> should be changed to {{$\{project.build.scriptSourceDirectory\}}}, which is 
> the default scripts source directory according to the super pom [0]. By 
> default this expands to {{$\{project.basedir\}/src/main/scripts}}.
> The previous default value, {{$\{project.build.sourceDirectory\}}}, should 
> still be checked and used if it contains {{*.html}} files and no other value 
> was configured.
> [0] - https://maven.apache.org/pom.html#The_Super_POM



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


[jira] [Closed] (SLING-9165) Correct example usage in plugin documentation

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9165.
-

> Correct example usage in plugin documentation
> -
>
> Key: SLING-9165
> URL: https://issues.apache.org/jira/browse/SLING-9165
> Project: Sling
>  Issue Type: Bug
>  Components: Maven Plugins and Archetypes
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: HTL Maven Plugin 2.0.0-1.4.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> The "Usage" page of the {{htl-maven-plugin}} provides some pom configuration 
> examples where some tags are not properly closed.



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


[jira] [Closed] (SLING-9217) The JSPC Maven plugin should allow configuring the package name under which JSPs are compiled

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9217.
-

> The JSPC Maven plugin should allow configuring the package name under which 
> JSPs are compiled
> -
>
> Key: SLING-9217
> URL: https://issues.apache.org/jira/browse/SLING-9217
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: JSPC Maven Plugin 2.2.0
>
>
> The JSPC Maven plugin currently uses the default package of the JSP compiler 
> for prefixing the package names under which JSPs are precompiled. However, 
> for projects that want to provide the precompiled JSPs in bundles and use 
> them in conjunction with the Apache Sling Scripting Bundle Tracker, the 
> package name identifies the resource type. Therefore the JSPC Maven plugin 
> should allow to set the 
> {{org.apache.sling.scripting.jsp.jasper.Constants.JSP_PACKAGE_NAME}} system 
> property and by default it should set it to the empty string.



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


[jira] [Closed] (SLING-9142) Deprecate JavaEscapeUtils and switch to JavaEscapeHelper

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9142.
-

> Deprecate JavaEscapeUtils and switch to JavaEscapeHelper
> 
>
> Key: SLING-9142
> URL: https://issues.apache.org/jira/browse/SLING-9142
> Project: Sling
>  Issue Type: Sub-task
>  Components: Scripting
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting HTL Java Compiler 1.2.0-1.4.0, Scripting HTL 
> Testing 1.0.22-1.4.0
>
>
> With {{org.apache.sling.commons.compiler.source.JavaEscapeHelper}} extracted 
> to the {{org.apache.sling.commons.compiler}}, the  
> {{org.apache.sling.scripting.sightly.java.compiler.JavaEscapeUtils}} should 
> be deprecated and its usage removed from the HTL Java Compiler.



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


[jira] [Closed] (SLING-6982) JSPC plugin should support additional resource roots

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-6982.
-

> JSPC plugin should support additional resource roots
> 
>
> Key: SLING-6982
> URL: https://issues.apache.org/jira/browse/SLING-6982
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Affects Versions: Maven JSPC Plugin 2.1.0
>Reporter: Tobias Bocanegra
>Assignee: Karl Pauls
>Priority: Major
> Fix For: JSPC Maven Plugin 2.2.0
>
>
> When trying to compile JSPs that have includes to dependent resources, it is 
> not possible to compile them. you can't put the includes into the same 
> sources, otherwise they will also be compiled.
> suggestion:
> - create new property: {{resourceDirectories}} that is used during resource 
> lookup.
> example:
> {noformat}
> 
> maven-dependency-plugin
> 
> 
> extract-deps
> generate-sources
> 
> unpack-dependencies
> 
> 
> 
> cq-foundation-content
> zip
> true
> 
> ${project.build.directory}/dependencies
> 
> 
> 
> 
> 
> 
> org.apache.sling
> jspc-maven-plugin
> 2.1.1-SNAPSHOT
> 
> 
> ${project.basedir}/jcr_root
> 
> 
> ${project.build.directory}/dependencies/jcr_root
> 
> false
> false
> 1.8
> 1.8
> 
> {noformat}



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


[jira] [Closed] (SLING-9453) Compile jsp in parallel

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9453.
-

> Compile jsp in parallel
> ---
>
> Key: SLING-9453
> URL: https://issues.apache.org/jira/browse/SLING-9453
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Affects Versions: Maven JSPC Plugin 2.1.0
>Reporter: Karl Pauls
>Assignee: Karl Pauls
>Priority: Major
> Fix For: JSPC Maven Plugin 2.2.0
>
>
> The jspc maven plugin currently compiles scripts one at a time - we should 
> make it compile them in parallel. 



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


[jira] [Closed] (SLING-9154) Update to the latest JSP compiler

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9154.
-

> Update to the latest JSP compiler
> -
>
> Key: SLING-9154
> URL: https://issues.apache.org/jira/browse/SLING-9154
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: JSPC Maven Plugin 2.2.0
>
>
> With SLING-9150 the JSP compiler uses different conventions for generating 
> and locating Java classes corresponding to JSP files or tag libraries. As 
> such, the JSPC Maven Plugin should be updated to the latest version of the 
> compiler.



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


[jira] [Closed] (SLING-9144) Replace unmaintained findbugs plugin with spotbugs

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9144.
-

> Replace unmaintained findbugs plugin with spotbugs
> --
>
> Key: SLING-9144
> URL: https://issues.apache.org/jira/browse/SLING-9144
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting HTL Java Compiler 1.2.0-1.4.0
>
>
> The {{findbugs-maven-plugin}} is unmaintained, but a replacement is 
> available: {{spotbugs-maven-plugin}}. Since Spotbugs has better support for 
> Java 11 it's recommended to switch to the newer plugin.



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


[jira] [Closed] (SLING-9457) Nested loops without an item identifier generate a Java compilation error

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9457.
-

> Nested loops without an item identifier generate a Java compilation error
> -
>
> Key: SLING-9457
> URL: https://issues.apache.org/jira/browse/SLING-9457
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting HTL Java Compiler 1.2.0-1.4.0
>
>
> SLING-9142 introduced a 
> [regression|https://github.com/apache/sling-org-apache-sling-scripting-sightly-compiler-java/commit/7476e0e3cad660228dc1e6c6dbc58a0ea5a5baee#diff-d97cfba1ce4a85137e765d5e9c38ebaaL50],
>  where nested loops without an item identifier would generate a Java compiler 
> error, since the nested loop tries to redefine the same local variable.



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


[jira] [Closed] (SLING-9048) The HTL engine does not specify the correct io.sightly.runtime requirement version range

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9048.
-

> The HTL engine does not specify the correct io.sightly.runtime requirement 
> version range
> 
>
> Key: SLING-9048
> URL: https://issues.apache.org/jira/browse/SLING-9048
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting HTL Engine 1.2.0-1.4.0
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Minor
> Fix For: Scripting HTL Engine 1.4.0-1.4.0
>
>
> When SLING-8471 was implemented, the transition from the 
> {{maven-bundle-plugin}} to the {{bnd-maven-plugin}} introduced the error of 
> defining the {{io.sightly.runtime}} requirement as:
> {code:java}
> Require-Capability: io.sightly.runtime; 
> filter:="(&(version<=1.0)(!(version>=2.0)))"
> {code}
> instead of:
> {code:java}
> Require-Capability: io.sightly.runtime; 
> filter:="(&(version>=1.0)(!(version>=2.0)))"
> {code}
> While in practice this doesn't affect a regular Sling setup, it should be 
> corrected.



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


[jira] [Closed] (SLING-9320) Allow bundled render units to access objects from the same bundle through the Use API

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9320.
-

> Allow bundled render units to access objects from the same bundle through the 
> Use API
> -
>
> Key: SLING-9320
> URL: https://issues.apache.org/jira/browse/SLING-9320
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting HTL Engine 1.4.0-1.4.0, Scripting HTL Testing 
> 1.0.22-1.4.0, Scripting HTL JS Use Provider 1.2.0
>
>
> Starting with SLING-8660, the HTL engine is able to work with precompiled 
> render units. However, the {{JavaUseProvider}} still needs to be extended to 
> allow the units to load objects using their own bundle classloader.



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


[jira] [Closed] (SLING-9147) Switch from JavaEscapeUtils to JavaEscapeHelper

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9147.
-

> Switch from JavaEscapeUtils to JavaEscapeHelper
> ---
>
> Key: SLING-9147
> URL: https://issues.apache.org/jira/browse/SLING-9147
> Project: Sling
>  Issue Type: Sub-task
>  Components: Scripting
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting HTL Engine 1.4.0-1.4.0, Scripting HTL Testing 
> 1.0.22-1.4.0
>
>
> Since {{org.apache.sling.scripting.sightly.java.compiler.JavaEscapeUtils}} 
> was deprecated, it's better to switch to the 
> {{org.apache.sling.commons.compiler.source.JavaEscapeHelper}} class provided 
> by the Commons Compiler module.



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


[jira] [Closed] (SLING-9406) Add bundled script support to the servlets resolver

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9406.
-

> Add bundled script support to the servlets resolver
> ---
>
> Key: SLING-9406
> URL: https://issues.apache.org/jira/browse/SLING-9406
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Affects Versions: Servlets Resolver 2.6.4
>Reporter: Karl Pauls
>Assignee: Karl Pauls
>Priority: Major
> Fix For: Scripting JSP 2.5.0, Scripting HTL Engine 1.4.0-1.4.0, 
> Servlets Resolver 2.7.0, Scripting Core 2.3.0
>
>  Time Spent: 4h
>  Remaining Estimate: 0h
>
> With the unification work for bundled scripts in SLING-9207 we can now 
> provide scripts via bundles. Currently, that involves the bundled script 
> tracker bundle that uses the provided meta-data of bundles providing scripts 
> to publish servlets for the scripts. As the only reason for these servlets is 
> to be picked-up by the resolver it makes sense to skip the intermediate step 
> to avoid having to publish all the servlets as services. 



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


[jira] [Closed] (SLING-9328) Allow loading template libraries from bundles

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9328.
-

> Allow loading template libraries from bundles
> -
>
> Key: SLING-9328
> URL: https://issues.apache.org/jira/browse/SLING-9328
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting HTL Engine 1.4.0-1.4.0
>
>
> The HTL engine allows defining template libraries (i.e. a file providing a 
> collection of templates), which can then be referenced so that a certain 
> template is loaded. With the option of providing HTL files as either bundled 
> scripts or precompiled {{RenderUnits}}, the {{RenderUnitProvider}} needs to 
> be enhanced so that it attempts to resolve the template libraries either in 
> the bundle providing the current {{RenderUnit}} or in the wired bundles.



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


[jira] [Closed] (SLING-9207) Unify the support for bundled scripts

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9207.
-

> Unify the support for bundled scripts
> -
>
> Key: SLING-9207
> URL: https://issues.apache.org/jira/browse/SLING-9207
> Project: Sling
>  Issue Type: New Feature
>  Components: Maven Plugins and Archetypes, Scripting
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
>  Labels: Sling-12-ReleaseNotes
> Fix For: HTL Maven Plugin 2.0.0-1.4.0, Scripting JSP 2.5.0, 
> Scripting HTL Engine 1.4.0-1.4.0, Commons Compiler 2.4.0, Scripting HTL Java 
> Compiler 1.2.0-1.4.0, JSPC Maven Plugin 2.2.0, Scripting Bundle Maven Plugin 
> 0.2.0, Servlets Resolver 2.7.0, Scripting Core 2.3.0, Scripting HTL JS Use 
> Provider 1.2.0
>
>
> This issue serves as a container issue for the work needed to enable unified 
> support bundled scripts in the JSP and HTL script engines.



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


[jira] [Closed] (SLING-9343) Versions of o.a.s.scripting.sightly bundles different from artifact versions

2020-06-22 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9343.
-

> Versions of o.a.s.scripting.sightly bundles different from artifact versions
> 
>
> Key: SLING-9343
> URL: https://issues.apache.org/jira/browse/SLING-9343
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting HTL Compiler 1.2.0-1.4.0, Scripting HTL Engine 
> 1.2.0-1.4.0, Scripting HTL Java Compiler 1.1.4-1.4.0, Scripting HTL Runtime 
> 1.1.2-1.4.0
>Reporter: Stefan Seifert
>Assignee: Radu Cotescu
>Priority: Critical
> Fix For: Scripting HTL Engine 1.4.0-1.4.0, Scripting HTL Java 
> Compiler 1.2.0-1.4.0, Scripting HTL Compiler 1.2.6-1.4.0, Scripting HTL 
> Runtime 1.2.2-1.4.0
>
>
> i've noticed that since the switch to the bnd-maven-plugin the bundle 
> versions of the scripting slightly bundles are transformed in a way that does 
> no longer match with the artifact version.
> example for 
> [org.apache.sling.scripting.sightly|https://repo1.maven.org/maven2/org/apache/sling/org.apache.sling.scripting.sightly/]:
> {noformat}
> 1.1.0-1.4.0 -> 1.1.0.1_4_0
> 1.1.2-1.4.0 -> 1.1.2.1_4_0
> 1.2.0-1.4.0 -> 1.2.0.0  -> this was the switch to bnd-maven-plugin
> 1.3.0-1.4.0 -> 1.3.0.0
> 1.3.2-1.4.0 -> 1.3.2.0
> {noformat}



--
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-06-22 Thread Robert Munteanu (Jira)


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

Robert Munteanu commented on SLING-9535:


Thanks for the report [~Leonardo Derks]. Sounds like you have a good 
understanding of the root cause of the problem. Would you we willing to try and 
submit a PR with a fix? I'd be happy to review.

A good first step would be to understand why the version storage is queried 
and, assuming it's not needed, exclude that from the default query.

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


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

2020-06-22 Thread Apache Jenkins Server
Please see 
https://builds.apache.org/job/Sling/job/sling-org-apache-sling-launchpad-testing/job/master/866/
 for details.

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

[GitHub] [sling-org-apache-sling-launchpad-integration-tests] rombert commented on pull request #1: [SLING-9417] Added test for an nt:file child of a versioned node

2020-06-22 Thread GitBox


rombert commented on pull request #1:
URL: 
https://github.com/apache/sling-org-apache-sling-launchpad-integration-tests/pull/1#issuecomment-647501018


   @alldaysunshine - I've released the jcr.resource bundle with your changes ( 
https://github.com/apache/sling-org-apache-sling-jcr-resource/commit/9902106a166b8d81aadbd28b752103e1844e2367
 ) and incorporated it into the Sling Starter ( 
https://github.com/apache/sling-org-apache-sling-starter/commit/423c6b4767e8de782bdd21876ac026df05ac5f70
  ).
   
   However, I still get test failures with your PR applied -
   
   ```
   [ERROR] Failures: 
   [ERROR]   
VersionParameterTest.testVersionParameterWithChildNode:136->HttpTestBase.getContent:419->HttpTestBase.getContent:424->HttpTestBase.getContent:432->HttpTestBase.getContent:457
 Expected status 200 for 
http://localhost:41000/sling-tests/1592830284798/185_1592830284800/childFile;v='1.0'
 (content=
   ```
   
   Can you double-check that the test is correct?



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

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




[jira] [Resolved] (SLING-9519) Modules to add to SonarCloud

2020-06-22 Thread Bertrand Delacretaz (Jira)


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

Bertrand Delacretaz resolved SLING-9519.

Resolution: Fixed

> Modules to add to SonarCloud
> 
>
> Key: SLING-9519
> URL: https://issues.apache.org/jira/browse/SLING-9519
> Project: Sling
>  Issue Type: Task
>  Components: CI
>Reporter: Bertrand Delacretaz
>Assignee: Bertrand Delacretaz
>Priority: Minor
>
> Let's use this ticket to batch a few such requests ( 
> https://cwiki.apache.org/confluence/display/SLING/SonarCloud+analysis )
> So far:
> * https://github.com/apache/sling-org-apache-sling-graphql-core/
> * https://github.com/apache/sling-org-apache-sling-pipes



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


Re: Deprecated org.apache.sling.servlets.post.AbstractPostOperation

2020-06-22 Thread Carlos Munoz
Thanks Bertrand. I will try this out, but I believe in theory it should
work for us.

And no worries about the contribution, at least it let me get more familiar
with some of Sling's internals :)

I'll still reiterate that the deprecation on the Post classes threw me off
because it meant our code ended up using deprecated classes, adding several
warnings to the compilation process. My suggestion would be to add this
solution you just proposed to the javadocs of those deprecated classes.

Regards,

Carlos

On Mon, Jun 22, 2020 at 8:27 AM Bertrand Delacretaz 
wrote:

> Hi Carlos,
>
> On Thu, Jun 18, 2020 at 3:59 AM Carlos Munoz  wrote:
> ...
> > https://github.com/apache/sling-org-apache-sling-servlets-post/pull/5
> ...
>
> Thank you for this!
>
> In the meantime I think there's a simpler way for you to use the
> existing
> org.apache.sling.servlets.post.impl.operations.AbstractPostOperation
> with no changes to Sling code.
>
> That class is public, so you can use it in your code, however it's not
> exported at runtime so your bundle fails to load it.
>
> The workaround is to embed the class in your bundle, using a bnd
> -includeresource as in [1].
>
> I think this is in some ways better than us moving that class to an
> exported package, as you can then precisely control which version of
> that class you use as that's the one you embedded as opposed to
> whatever the environment provides.
>
> Would that work for you?
>
> -Bertrand
>
> P.S. too bad this means we probably don't need your contribution,
> sorry that we didn't suggest this variant before
>
> [1]
> https://github.com/apache/sling-org-apache-sling-servlets-post/blob/master/bnd.bnd
>
>


Re: [RESULT][VOTE] Release Apache Sling Scripting HTL Compiler 1.2.6-1.4.0, Apache Sling Scripting HTL Engine 1.4.0-1.4.0, Apache Sling Scripting HTL Java Compiler 1.2.0-1.4.0, Apache Sling JSPC Maven

2020-06-22 Thread Karl Pauls
Time to call the vote on this release.

The vote has passed with the following result :

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

* No other votes

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


[GitHub] [sling-org-apache-sling-servlets-post] bdelacretaz commented on pull request #5: remove jcr-specific APIs from AbstractPostOperation

2020-06-22 Thread GitBox


bdelacretaz commented on pull request #5:
URL: 
https://github.com/apache/sling-org-apache-sling-servlets-post/pull/5#issuecomment-647482796


   As mentioned on our dev list, this change might not be needed if you embed 
the `org.apache.sling.servlets.post.impl.operations.AbstractPostOperation` in 
your bundle with a bnd `-includeresources` instruction. Let's see if that 
method works for you.



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: Deprecated org.apache.sling.servlets.post.AbstractPostOperation

2020-06-22 Thread Bertrand Delacretaz
Hi Carlos,

On Thu, Jun 18, 2020 at 3:59 AM Carlos Munoz  wrote:
...
> https://github.com/apache/sling-org-apache-sling-servlets-post/pull/5
...

Thank you for this!

In the meantime I think there's a simpler way for you to use the
existing org.apache.sling.servlets.post.impl.operations.AbstractPostOperation
with no changes to Sling code.

That class is public, so you can use it in your code, however it's not
exported at runtime so your bundle fails to load it.

The workaround is to embed the class in your bundle, using a bnd
-includeresource as in [1].

I think this is in some ways better than us moving that class to an
exported package, as you can then precisely control which version of
that class you use as that's the one you embedded as opposed to
whatever the environment provides.

Would that work for you?

-Bertrand

P.S. too bad this means we probably don't need your contribution,
sorry that we didn't suggest this variant before

[1] 
https://github.com/apache/sling-org-apache-sling-servlets-post/blob/master/bnd.bnd


[jira] [Closed] (SLING-9440) Clean up usage of constants

2020-06-22 Thread Robert Munteanu (Jira)


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

Robert Munteanu closed SLING-9440.
--

> Clean up usage of constants
> ---
>
> Key: SLING-9440
> URL: https://issues.apache.org/jira/browse/SLING-9440
> Project: Sling
>  Issue Type: Improvement
>  Components: JCR
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Minor
> Fix For: JCR Resource 3.0.22
>
>
> There are a lot of constants being referenced from Jackrabbit. To make it 
> clearer which parts are Jackrabbit-specific the constants from the JCR 2.0 
> namespace should be prefered (also they don't rely on any prefixes as they 
> always use fully-qualified names).



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


[jira] [Closed] (SLING-9417) Content-type and InputStream are null when accessing nt:file resources with ";v="

2020-06-22 Thread Robert Munteanu (Jira)


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

Robert Munteanu closed SLING-9417.
--

> Content-type and InputStream are null when accessing nt:file resources with 
> ";v="
> -
>
> Key: SLING-9417
> URL: https://issues.apache.org/jira/browse/SLING-9417
> Project: Sling
>  Issue Type: Bug
>  Components: JCR
>Reporter: Matthias Herold
>Assignee: Robert Munteanu
>Priority: Minor
> Fix For: JCR Resource 3.0.22
>
>   Original Estimate: 1h
>  Time Spent: 4h 50m
>  Remaining Estimate: 0h
>
> When using the methods resource.getMetadata().getContentType() or 
> resource.adaptTo(InputStream.class), both methods return null when:
>  # the resource is a child of a versionable node,
>  # the resource is of type nt:file, and
>  # resource has been looked up with a version identifier in the URL (";v=").
> From my understanding, both methods should return the relevant values from 
> the frozen node. The error occurs because of line 185 in JcrNodeResource.java
> {{Node content = node.isNodeType(NT_FILE)}}
> {{? node.getNode(JCR_CONTENT)}}
> {{: node.isNodeType(NT_LINKEDFILE) ? node.getProperty(JCR_CONTENT).getNode() 
> : node;}}
> When the resource is looked up with a version modifier, the node type will 
> not nt:file. Instead it is jcr:frozenNode with a property 
> jcr:frozenPrimaryType set to nt:file. Therefore, the above code fails and 
> will not use the jcr:content subnode, but the node itself. In my opinion, it 
> would be better to change this to: 
> Node content = (node.isNodeType(NodeType.NT_FILE) || 
> (node.isNodeType("nt:frozenNode") && 
> node.hasProperty("jcr:frozenPrimaryType") 
> {{ && 
> node.getProperty("jcr:frozenPrimaryType").getString().equals(NT_FILE)))}}
> {{ ? node.getNode(Node.JCR_CONTENT)
> {{ : node.isNodeType(JcrConstants.NT_LINKEDFILE) ? 
> node.getProperty(Node.JCR_CONTENT).getNode() : node;}}
>  
> JcrResourceMetadata has the same issue (line 65):
> {{ if ( (!nodePromotionChecked) && node.isNodeType(NT_FILE)) {}}
> This could be changed to: 
> {{ if ( (!nodePromotionChecked) && (node.isNodeType(NT_FILE) ||}}
> {{ (node.isNodeType("nt:frozenNode") && 
> node.hasProperty("jcr:frozenPrimaryType") }}
> {{ && 
> node.getProperty("jcr:frozenPrimaryType").getString().equals(NT_FILE {}}
>  
> As I'm still a newbie in Sling, I'm not sure if the proposed solution is 
> completely right. At the moment, I use a ResourceDecorator for my project 
> with these changes and this fixes my problem - but there might be a better 
> way to solve this.
>  
>  



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


[RESULT] [VOTE] Release Apache Sling JCR Resource 3.0.22

2020-06-22 Thread Robert Munteanu
Hi,

The vote has passed with the following result:

+1 (binding): Robert Munteanu, Carsten Ziegeler, Timothée Maret, Karl
Pauls, Dan Klco
+1 (non-binding): none

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

Regards,
Robert Munteanu



[jira] [Closed] (SLING-7731) Call to addService is no longer needed for modification events in SlingAuthenticatorServiceListener

2020-06-22 Thread Robert Munteanu (Jira)


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

Robert Munteanu closed SLING-7731.
--

> Call to addService is no longer needed for modification events in 
> SlingAuthenticatorServiceListener
> ---
>
> Key: SLING-7731
> URL: https://issues.apache.org/jira/browse/SLING-7731
> Project: Sling
>  Issue Type: Bug
>  Components: Authentication
>Affects Versions: Auth Core 1.3.18
>Reporter: Vincent Frey
>Assignee: Robert Munteanu
>Priority: Major
> Fix For: Auth Core 1.4.8
>
>
> After introduction of modifiedService(...) method in 
> SlingAuthenticatorServiceListener, calling addService(...) is no longer 
> needed for modification event.
> [https://github.com/apache/sling-org-apache-sling-auth-core/blob/master/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticatorServiceListener.java#L85]
> Therefore line 85 should be changed from:
> {code}
> if ((event.getType() & (ServiceEvent.REGISTERED | ServiceEvent.MODIFIED)) != 
> 0) {
> {code}
> to:
> {code}
> if ((event.getType() & ServiceEvent.REGISTERED) != 0) {
> {code}



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


[RESULT] [VOTE] Release Apache Sling Auth Core 1.4.8

2020-06-22 Thread Robert Munteanu
Hi,

The vote has passed with the following result:

+1 (binding): Robert Munteanu, Carsten Ziegeler, Timothée Maret, Dan
Klco
+1 (non-binding): Andreas Schaefer

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

Regards,
Robert Munteanu



[jira] [Closed] (SLING-9247) Improve Performance Of Testing Ignored GET Parameters

2020-06-22 Thread Robert Munteanu (Jira)


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

Robert Munteanu closed SLING-9247.
--

> Improve Performance Of Testing Ignored GET Parameters
> -
>
> Key: SLING-9247
> URL: https://issues.apache.org/jira/browse/SLING-9247
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions
>Affects Versions: Dynamic Include 3.1.6
>Reporter: Yegor Kozlov
>Assignee: Robert Munteanu
>Priority: Minor
> Fix For: Dynamic Include 3.2.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> This is a follow-up on SLING-9045
> _org.apache.sling.dynamicinclude.Configuration_ loads the list of ignored GET 
> parameters into a _java.util.List_ which is further checked from 
> _IncludeTagFilter_ via _List#contains_
> Calling _List#contains_ in a loop is kind of a smell. I believe 
> _java.util.Set_ will be a more appropriate container with fixed O(1) cost of 
> _contains()_.
>  



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


[jira] [Closed] (SLING-8987) Remove exported packages in Sling Dynamic Include

2020-06-22 Thread Robert Munteanu (Jira)


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

Robert Munteanu closed SLING-8987.
--

> Remove exported packages in Sling Dynamic Include
> -
>
> Key: SLING-8987
> URL: https://issues.apache.org/jira/browse/SLING-8987
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: Robert Munteanu
>Assignee: Robert Munteanu
>Priority: Critical
> Fix For: Dynamic Include 3.2.0
>
>
> With SLING-8982 changes that were supposed to be transparent to the consumers 
> have bled into the API. We should review what really needs to be exported (if 
> anything).  My hunch is that we actually don't need to export anything, but 
> that should be validated.



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


[jira] [Closed] (SLING-9045) Add option to process requests with querystring parameters

2020-06-22 Thread Robert Munteanu (Jira)


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

Robert Munteanu closed SLING-9045.
--

> Add option to process requests with querystring parameters
> --
>
> Key: SLING-9045
> URL: https://issues.apache.org/jira/browse/SLING-9045
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions
>Affects Versions: Dynamic Include 3.1.6
>Reporter: John Mitchell
>Assignee: Robert Munteanu
>Priority: Major
> Fix For: Dynamic Include 3.2.0
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> The SDI module currently doesn't process any requests that have querystring 
> parameters on them. This affects the processing of requests that include 
> string such as campaign codes (utm), and other similar client side processed 
> parameters.
> This is a proposal to add an option to allow applications to enable the 
> processing of these requests by SDI should it be appropriate for their use 
> case, particularly when dispatcher processing rules are set to ignore all URL 
> parameters.



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


[jira] [Closed] (SLING-8982) dynamic-include: upgrade to parent pom 35

2020-06-22 Thread Robert Munteanu (Jira)


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

Robert Munteanu closed SLING-8982.
--

> dynamic-include: upgrade to parent pom 35
> -
>
> Key: SLING-8982
> URL: https://issues.apache.org/jira/browse/SLING-8982
> Project: Sling
>  Issue Type: Sub-task
>Reporter: Robert Munteanu
>Assignee: Robert Munteanu
>Priority: Major
> Fix For: Dynamic Include 3.2.0
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>




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


[jira] [Closed] (SLING-8427) Sling Dynamic Include - TTL not being set on synthetic resources

2020-06-22 Thread Robert Munteanu (Jira)


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

Robert Munteanu closed SLING-8427.
--

> 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
>Assignee: Robert Munteanu
>Priority: Major
> Fix For: Dynamic Include 3.2.0
>
>
> 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
(v8.3.4#803005)


  1   2   >