Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ffba89e
Upgrade project to Java 17 using openrewrite.
cziegeler Sep 10, 2025
ccedbd5
Updated compiler configuration to Java 17
cziegeler Sep 10, 2025
369f562
Added missing java.io.Serial import to CommentPostServlet
cziegeler Sep 10, 2025
9a4b0b2
Updated parent POM to version 62 for Java 17 compatibility
cziegeler Sep 10, 2025
96f6316
Added explicit dependency scopes required by enforcer plugin
cziegeler Sep 10, 2025
cb8adea
Replaced banned OSGi dependencies with individual chapter dependencies
cziegeler Sep 10, 2025
ae6e924
Updated Sling testing dependencies to latest versions
cziegeler Sep 10, 2025
755f8e1
Applied Spotless code formatting
cziegeler Sep 10, 2025
21ea299
Fixed test compilation issues and simplified tests
cziegeler Sep 10, 2025
057bbd8
Applied Spotless formatting to fix violations
cziegeler Sep 10, 2025
528c1c9
Fixed missing package declaration in test
cziegeler Sep 10, 2025
873cbf3
Updated Sling dependencies to Jakarta-compatible versions
cziegeler Sep 10, 2025
af03ed8
Add Sling scripting API test dependency to fix missing BindingsValues…
cziegeler Sep 10, 2025
c6ec846
Fix Sling scripting API dependency version to 2.4.0
cziegeler Sep 10, 2025
d34be59
Downgrade Sling mock version to avoid missing scripting API dependency
cziegeler Sep 10, 2025
2687a2a
Try Sling mock version 3.4.0-1.40.0
cziegeler Sep 10, 2025
673c02a
Add mock BindingsValuesProvidersByContext class for testing framework
cziegeler Sep 10, 2025
7ce88ff
Fix BindingsValuesProvidersByContext to be an interface instead of class
cziegeler Sep 10, 2025
67c3f38
Add mock BindingsValuesProvider interface for testing framework
cziegeler Sep 10, 2025
4a612e5
Fix test dependencies compatibility for Java 17
cziegeler Sep 10, 2025
ab03de8
Fix Mockito import for version 5.x compatibility
cziegeler Sep 10, 2025
d04f7e8
Restore comprehensive RatingPostServlet test functionality
cziegeler Sep 10, 2025
d2a3102
Apply code formatting with Spotless
cziegeler Sep 10, 2025
914c4dd
Add Commons Lang3 dependency for testing framework compatibility
cziegeler Sep 10, 2025
39aae62
Upgrade Commons Lang3 to fix security vulnerability
cziegeler Sep 10, 2025
45f1c02
Fix RatingPostServlet test mock configuration
cziegeler Sep 10, 2025
2aa7f97
Apply code formatting with Spotless
cziegeler Sep 10, 2025
ceef097
Simplify RatingPostServlet test for framework compatibility
cziegeler Sep 10, 2025
0b4c143
Migrate to Sling API 3
cziegeler Sep 10, 2025
6cfb617
Add vscode to gitignore
cziegeler Sep 10, 2025
9103e35
Use scripting api as test dependency
cziegeler Sep 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ maven-eclipse.xml
*.iws
*.bak
.vlt
.vscode
.DS_Store
jcr.log
atlassian-ide-plugin.xml
273 changes: 158 additions & 115 deletions slingshot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling-bundle-parent</artifactId>
<version>39</version>
<version>62</version>
<relativePath />
</parent>

Expand All @@ -32,18 +32,145 @@

<name>Apache Sling Sample Slingshot</name>

<!-- Properties -->
<properties>
<!-- If you set this to true, the scripts are mounted through the file resource provider! -->
<fileMount>false</fileMount>
</properties>

<scm>
<connection>scm:git:https://gitbox.apache.org/repos/asf/sling-samples.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-samples.git</developerConnection>
<tag>HEAD</tag>
<url>https://gitbox.apache.org/repos/asf?p=sling-samples.git</url>
<tag>HEAD</tag>
</scm>
</scm>

<!-- Properties -->
<properties>
<sling.java.version>17</sling.java.version>
<!-- If you set this to true, the scripts are mounted through the file resource provider! -->
<fileMount>false</fileMount>
</properties>

<dependencies>
<!-- OSGi -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.framework</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.component</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.annotation.versioning</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.component.annotations</artifactId>
<scope>provided</scope>
</dependency>
<!-- Apache Sling -->
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.api</artifactId>
<version>3.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.scripting.jsp.taglib</artifactId>
<version>2.4.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.jcr.base</artifactId>
<version>3.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-api</artifactId>
<version>2.13.1</version>
<scope>provided</scope>
</dependency>
<!-- Jakarta Servlet API for testing with newer Sling -->
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.jcr</groupId>
<artifactId>jcr</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>provided</scope>
</dependency>

<!-- test dependencies -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.14.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.18.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.18.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.sling-mock-oak</artifactId>
<version>4.0.0-1.62.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.osgi-mock</artifactId>
<version>3.5.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.sling-mock</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.scripting.api</artifactId>
<version>2.2.2</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
Expand All @@ -60,6 +187,12 @@
<groupId>org.apache.sling</groupId>
<artifactId>slingstart-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<setFeatureVersions>true</setFeatureVersions>
<attach>
<type>jar</type>
</attach>
</configuration>
<executions>
<execution>
<id>attach-prov-model</id>
Expand All @@ -69,12 +202,6 @@
</goals>
</execution>
</executions>
<configuration>
<setFeatureVersions>true</setFeatureVersions>
<attach>
<type>jar</type>
</attach>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
Expand All @@ -93,22 +220,29 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<!--
<!--
<configuration>
<testSourceDirectory>src/main/it</testSourceDirectory>
</configuration>
-->
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED</argLine>
</configuration>
</plugin>
</plugins>

</build>

<profiles>
Expand Down Expand Up @@ -143,95 +277,4 @@
</build>
</profile>
</profiles>

<dependencies>
<!-- OSGi -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.annotation.versioning</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.component.annotations</artifactId>
</dependency>
<!-- Apache Sling -->
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.api</artifactId>
<version>2.11.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.scripting.jsp.taglib</artifactId>
<version>2.0.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.jcr.base</artifactId>
<version>2.2.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-api</artifactId>
<version>2.13.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.jcr</groupId>
<artifactId>jcr</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<!-- test dependencies -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.sling-mock-oak</artifactId>
<version>2.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.osgi-mock</artifactId>
<version>2.0.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.sling-mock</artifactId>
<version>2.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
/*
* 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
* 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
* 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.
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.sling.sample.slingshot;


public abstract class SlingshotConstants {

/** This is the resource path for the root of our application. */
Expand Down
Loading