This is an automated email from the ASF dual-hosted git repository. sseifert pushed a commit to branch feature/SLING-13120-java-21-compatibility in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-pipes.git
commit 51e4134b0871fc3905b5974750e83b26082bfbf0 Author: Stefan Seifert <[email protected]> AuthorDate: Thu Feb 19 11:42:34 2026 +0100 update dependencies and testing dependencies --- pom.xml | 40 +++++++++++++--------- .../org/apache/sling/pipes/internal/PathPipe.java | 15 ++++---- .../sling/pipes/internal/PipeBuilderImpl.java | 30 ++++++++-------- .../apache/sling/pipes/internal/PathPipeTest.java | 24 ++++++------- 4 files changed, 58 insertions(+), 51 deletions(-) diff --git a/pom.xml b/pom.xml index 17cc630..c472ee6 100644 --- a/pom.xml +++ b/pom.xml @@ -35,9 +35,11 @@ <description>bulk content changes tool</description> <properties> + <project.build.outputTimestamp>1660725790</project.build.outputTimestamp> <sling.java.version>11</sling.java.version> <org.ops4j.pax.exam.version>4.13.3</org.ops4j.pax.exam.version> - <project.build.outputTimestamp>1660725790</project.build.outputTimestamp> + <oak.version>1.68.0</oak.version> + <jackrabbit.version>2.22.2</jackrabbit.version> </properties> <scm> @@ -87,6 +89,16 @@ </excludes> </configuration> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <!-- nashorn-core has a module-info.class, causing Surefire to place it on the module path. + This makes the JVM enforce JPMS access rules, which blocks the reflective field injection + used by the Sling OSGi mock framework. Force classpath mode to avoid this. --> + <useModulePath>false</useModulePath> + </configuration> + </plugin> </plugins> </build> <profiles> @@ -180,7 +192,7 @@ <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.api</artifactId> - <version>2.16.0</version> + <version>2.27.6</version> <scope>provided</scope> </dependency> <dependency> @@ -191,13 +203,13 @@ <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.query</artifactId> - <version>4.0.0</version> + <version>4.0.4</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.jackrabbit</groupId> - <artifactId>jackrabbit-api</artifactId> - <version>2.14.0</version> + <artifactId>oak-jackrabbit-api</artifactId> + <version>${oak.version}</version> <scope>provided</scope> </dependency> <dependency> @@ -233,7 +245,7 @@ <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.jcr.resource</artifactId> - <version>2.7.4</version> + <version>3.0.18</version> <scope>compile</scope> </dependency> <dependency> @@ -245,19 +257,19 @@ <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.models.api</artifactId> - <version>1.3.2</version> + <version>1.3.8</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.jackrabbit.vault</groupId> <artifactId>org.apache.jackrabbit.vault</artifactId> - <version>3.1.44</version> + <version>3.2.8</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.jackrabbit</groupId> <artifactId>jackrabbit-jcr-commons</artifactId> - <version>2.14.0</version> + <version>${jackrabbit.version}</version> <scope>provided</scope> </dependency> <dependency> @@ -309,19 +321,13 @@ <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.testing.sling-mock.junit4</artifactId> - <version>2.6.2</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.sling</groupId> - <artifactId>org.apache.sling.testing.jcr-mock</artifactId> - <version>1.3.2</version> + <version>3.6.0</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.testing.sling-mock-oak</artifactId> - <version>2.1.0</version> + <version>4.0.0-1.62.0</version> <scope>test</scope> </dependency> <dependency> diff --git a/src/main/java/org/apache/sling/pipes/internal/PathPipe.java b/src/main/java/org/apache/sling/pipes/internal/PathPipe.java index aa328c1..56cf519 100644 --- a/src/main/java/org/apache/sling/pipes/internal/PathPipe.java +++ b/src/main/java/org/apache/sling/pipes/internal/PathPipe.java @@ -16,6 +16,14 @@ */ package org.apache.sling.pipes.internal; +import static org.apache.sling.jcr.resource.api.JcrResourceConstants.NT_SLING_FOLDER; + +import java.util.Collections; +import java.util.Iterator; + +import javax.jcr.RepositoryException; +import javax.jcr.Session; + import org.apache.commons.lang3.StringUtils; import org.apache.jackrabbit.commons.JcrUtils; import org.apache.sling.api.resource.PersistenceException; @@ -27,13 +35,6 @@ import org.apache.sling.pipes.Plumber; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import java.util.Collections; -import java.util.Iterator; - -import static org.apache.sling.jcr.resource.JcrResourceConstants.NT_SLING_FOLDER; - /** * creates or get given expression's path and returns corresponding resource * this pipe can be configured with the following properties: diff --git a/src/main/java/org/apache/sling/pipes/internal/PipeBuilderImpl.java b/src/main/java/org/apache/sling/pipes/internal/PipeBuilderImpl.java index 50ee9d6..b8a5a18 100644 --- a/src/main/java/org/apache/sling/pipes/internal/PipeBuilderImpl.java +++ b/src/main/java/org/apache/sling/pipes/internal/PipeBuilderImpl.java @@ -16,6 +16,21 @@ */ package org.apache.sling.pipes.internal; +import static org.apache.commons.lang3.StringUtils.EMPTY; +import static org.apache.sling.jcr.resource.api.JcrResourceConstants.NT_SLING_FOLDER; +import static org.apache.sling.jcr.resource.api.JcrResourceConstants.NT_SLING_ORDERED_FOLDER; +import static org.apache.sling.jcr.resource.api.JcrResourceConstants.SLING_RESOURCE_TYPE_PROPERTY; +import static org.apache.sling.pipes.BasePipe.SLASH; +import static org.apache.sling.pipes.CommandUtil.checkArguments; +import static org.apache.sling.pipes.CommandUtil.writeToMap; +import static org.apache.sling.pipes.internal.ManifoldPipe.PN_NUM_THREADS; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import org.apache.commons.lang3.StringUtils; import org.apache.sling.api.resource.ModifiableValueMap; import org.apache.sling.api.resource.PersistenceException; @@ -42,21 +57,6 @@ import org.apache.sling.pipes.internal.slingquery.ParentsPipe; import org.apache.sling.pipes.internal.slingquery.SiblingsPipe; import org.slf4j.Logger; import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static org.apache.commons.lang3.StringUtils.EMPTY; -import static org.apache.sling.jcr.resource.JcrResourceConstants.NT_SLING_FOLDER; -import static org.apache.sling.jcr.resource.JcrResourceConstants.NT_SLING_ORDERED_FOLDER; -import static org.apache.sling.jcr.resource.JcrResourceConstants.SLING_RESOURCE_TYPE_PROPERTY; -import static org.apache.sling.pipes.BasePipe.SLASH; -import static org.apache.sling.pipes.CommandUtil.checkArguments; -import static org.apache.sling.pipes.CommandUtil.writeToMap; -import static org.apache.sling.pipes.internal.ManifoldPipe.PN_NUM_THREADS; /** * Implementation of the PipeBuilder interface */ diff --git a/src/test/java/org/apache/sling/pipes/internal/PathPipeTest.java b/src/test/java/org/apache/sling/pipes/internal/PathPipeTest.java index 7265b5e..451cc83 100644 --- a/src/test/java/org/apache/sling/pipes/internal/PathPipeTest.java +++ b/src/test/java/org/apache/sling/pipes/internal/PathPipeTest.java @@ -16,17 +16,7 @@ */ package org.apache.sling.pipes.internal; -import org.apache.sling.api.resource.PersistenceException; -import org.apache.sling.api.resource.Resource; -import org.apache.sling.api.resource.ResourceResolver; -import org.apache.sling.api.resource.ValueMap; -import org.apache.sling.pipes.AbstractPipeTest; -import org.apache.sling.pipes.Pipe; -import org.junit.Test; - -import javax.jcr.Node; - -import static org.apache.sling.jcr.resource.JcrResourceConstants.NT_SLING_FOLDER; +import static org.apache.sling.jcr.resource.api.JcrResourceConstants.NT_SLING_FOLDER; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; @@ -35,6 +25,16 @@ import java.lang.reflect.InvocationTargetException; import java.time.Instant; import java.util.Calendar; +import javax.jcr.Node; + +import org.apache.sling.api.resource.PersistenceException; +import org.apache.sling.api.resource.Resource; +import org.apache.sling.api.resource.ResourceResolver; +import org.apache.sling.api.resource.ValueMap; +import org.apache.sling.pipes.AbstractPipeTest; +import org.apache.sling.pipes.Pipe; +import org.junit.Test; + /** * Testing path pipe using pipe builder */ @@ -93,5 +93,5 @@ public class PathPipeTest extends AbstractPipeTest { Instant modifiedAgain = Instant.ofEpochMilli(fruits.get("jcr:lastModified", Calendar.class).getTimeInMillis()); assertEquals("path should not mark *again* a path already created", modified, modifiedAgain); } - + } \ No newline at end of file
