This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-starter-test-services.git
The following commit(s) were added to refs/heads/master by this push:
new 6acdd11 SLING-13070 - ScriptContextProvider for bundled scripts does
not properly set JAKARTA_REQUEST and JAKARTA_REPONSE (#22)
6acdd11 is described below
commit 6acdd11a51e2996081a7bc4708ffca7177a4bb10
Author: Robert Munteanu <[email protected]>
AuthorDate: Tue Jan 27 15:50:00 2026 +0100
SLING-13070 - ScriptContextProvider for bundled scripts does not properly
set JAKARTA_REQUEST and JAKARTA_REPONSE (#22)
Add some bundled scripts to exercise this scenario during the Starter
integration tests.
---
bnd.bnd | 8 +++++++-
pom.xml | 13 +++++++++++++
.../apps/sling/bundled-scripts/expressions/html.html | 19 +++++++++++++++++++
.../sling/bundled-scripts/included/included.html | 20 ++++++++++++++++++++
.../apps/sling/bundled-scripts/simple/html.jsp | 20 ++++++++++++++++++++
5 files changed, 79 insertions(+), 1 deletion(-)
diff --git a/bnd.bnd b/bnd.bnd
index e679c26..81cfe26 100644
--- a/bnd.bnd
+++ b/bnd.bnd
@@ -1,3 +1,9 @@
+Provide-Capability:
${org.apache.sling.scriptingbundle.maven.plugin.Provide-Capability}
+
+Require-Capability:\
+
osgi.extender;filter:="(&(osgi.extender=sling.scripting)(version>=1.0.0)(!(version>=2.0.0)))",\
+ ${org.apache.sling.scriptingbundle.maven.plugin.Require-Capability}
+
Sling-Nodetypes:\
SLING-INF/nodetypes/test.cnd
@@ -17,4 +23,4 @@ Sling-Model-Packages:\
org.apache.sling.starter.testservices.models
-includeresource:\
- @org.apache.felix.utils-*.jar!/org/apache/felix/utils/json/JSONWriter*
+ @org.apache.felix.utils-*.jar!/org/apache/felix/utils/json/JSONWriter*
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 813a17e..81ae7e9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -191,6 +191,19 @@
<build>
<plugins>
+ <plugin>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>scriptingbundle-maven-plugin</artifactId>
+ <version>0.5.2</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>metadata</goal>
+ </goals>
+ <phase>process-resources</phase>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
diff --git
a/src/main/resources/javax.script/apps/sling/bundled-scripts/expressions/html.html
b/src/main/resources/javax.script/apps/sling/bundled-scripts/expressions/html.html
new file mode 100644
index 0000000..bc1ab49
--- /dev/null
+++
b/src/main/resources/javax.script/apps/sling/bundled-scripts/expressions/html.html
@@ -0,0 +1,19 @@
+<!--/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/-->
+<sly data-sly-use.included="/apps/sling/bundled-scripts/included/included.html"
+ data-sly-call="${included.main}"/>
\ No newline at end of file
diff --git
a/src/main/resources/javax.script/apps/sling/bundled-scripts/included/included.html
b/src/main/resources/javax.script/apps/sling/bundled-scripts/included/included.html
new file mode 100644
index 0000000..3785e51
--- /dev/null
+++
b/src/main/resources/javax.script/apps/sling/bundled-scripts/included/included.html
@@ -0,0 +1,20 @@
+<!--/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/-->
+<template data-sly-template.main>
+ <p>Included output</p>
+</template>
\ No newline at end of file
diff --git
a/src/main/resources/javax.script/apps/sling/bundled-scripts/simple/html.jsp
b/src/main/resources/javax.script/apps/sling/bundled-scripts/simple/html.jsp
new file mode 100644
index 0000000..144b6c1
--- /dev/null
+++ b/src/main/resources/javax.script/apps/sling/bundled-scripts/simple/html.jsp
@@ -0,0 +1,20 @@
+<%--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+--%>
+bundled script
\ No newline at end of file