You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2019/06/20 14:06:27 UTC
[sling-org-apache-sling-rewriter] branch master updated (669f207 ->
7be7fd3)
This is an automated email from the ASF dual-hosted git repository.
olli pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-rewriter.git.
from 669f207 Updating badges for org-apache-sling-rewriter
new 72abe36 fix typo
new 7be7fd3 SLING-8524 Make testing compliant with Java 9 and higher
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
pom.xml | 31 ++++++++------
.../rewriter/it/tests/RewriterTestSupport.java | 49 ++++++++++++++++------
2 files changed, 55 insertions(+), 25 deletions(-)
[sling-org-apache-sling-rewriter] 02/02: SLING-8524 Make testing
compliant with Java 9 and higher
Posted by ol...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-rewriter.git
commit 7be7fd3d9d3aa7009f7bb8a85c9498085d278462
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Thu Jun 20 16:05:37 2019 +0200
SLING-8524 Make testing compliant with Java 9 and higher
* Use Sling Bundle Parent 35
* Update Pax Exam to 4.13.1
* Update Testing PaxExam to 3.0.0
* Update Felix Framework to 6.0.3
* Update Sling Mock (JUnit4) to 2.3.12
* Update Logging Mock to 2.0.0
---
pom.xml | 29 ++++++++-----
.../rewriter/it/tests/RewriterTestSupport.java | 49 ++++++++++++++++------
2 files changed, 54 insertions(+), 24 deletions(-)
diff --git a/pom.xml b/pom.xml
index ac5249e..101389c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,8 +22,8 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.sling</groupId>
- <artifactId>sling</artifactId>
- <version>33</version>
+ <artifactId>sling-bundle-parent</artifactId>
+ <version>35</version>
<relativePath />
</parent>
@@ -44,7 +44,7 @@
</scm>
<properties>
- <org.ops4j.pax.exam.version>4.9.1</org.ops4j.pax.exam.version>
+ <org.ops4j.pax.exam.version>4.13.1</org.ops4j.pax.exam.version>
</properties>
<build>
@@ -59,7 +59,7 @@
</plugin>
<plugin>
<groupId>org.apache.sling</groupId>
- <artifactId>maven-sling-plugin</artifactId>
+ <artifactId>sling-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-adapter-metadata</id>
@@ -136,9 +136,15 @@
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
- <artifactId>org.apache.sling.testing.paxexam</artifactId>
+ <artifactId>org.apache.sling.resource.presence</artifactId>
<version>0.0.2</version>
- <scope>provided</scope>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>org.apache.sling.testing.paxexam</artifactId>
+ <version>3.0.0</version>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
@@ -165,6 +171,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
+ <scope>provided</scope>
</dependency>
<!-- testing -->
<dependency>
@@ -174,14 +181,14 @@
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
- <artifactId>org.apache.sling.testing.sling-mock</artifactId>
- <version>1.5.0</version>
+ <artifactId>org.apache.sling.testing.sling-mock.junit4</artifactId>
+ <version>2.3.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.logging-mock</artifactId>
- <version>1.0.0</version>
+ <version>2.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -194,14 +201,14 @@
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.framework</artifactId>
- <version>5.4.0</version>
+ <version>6.0.3</version>
<scope>test</scope>
</dependency>
<!-- jsoup -->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
- <version>1.9.1</version>
+ <version>1.12.1</version>
<scope>test</scope>
</dependency>
<!-- testing -->
diff --git a/src/test/java/org/apache/sling/rewriter/it/tests/RewriterTestSupport.java b/src/test/java/org/apache/sling/rewriter/it/tests/RewriterTestSupport.java
index 8f4196c..ba2c4d3 100644
--- a/src/test/java/org/apache/sling/rewriter/it/tests/RewriterTestSupport.java
+++ b/src/test/java/org/apache/sling/rewriter/it/tests/RewriterTestSupport.java
@@ -18,32 +18,57 @@
*/
package org.apache.sling.rewriter.it.tests;
-import static org.apache.sling.testing.paxexam.SlingOptions.slingCommonsHtml;
-import static org.apache.sling.testing.paxexam.SlingOptions.slingCommonsMetrics;
-import static org.apache.sling.testing.paxexam.SlingOptions.slingLaunchpadOakTar;
-import static org.apache.sling.testing.paxexam.SlingOptions.slingScriptingJavascript;
-import static org.ops4j.pax.exam.CoreOptions.composite;
-import static org.ops4j.pax.exam.CoreOptions.junitBundles;
-import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import javax.inject.Inject;
+import org.apache.sling.api.servlets.ServletResolver;
+import org.apache.sling.resource.presence.ResourcePresence;
import org.apache.sling.testing.paxexam.TestSupport;
import org.ops4j.pax.exam.Configuration;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.ProbeBuilder;
import org.ops4j.pax.exam.TestProbeBuilder;
+import org.ops4j.pax.exam.util.Filter;
+import org.osgi.service.http.HttpService;
+
+import static org.apache.sling.testing.paxexam.SlingOptions.slingCommonsHtml;
+import static org.apache.sling.testing.paxexam.SlingOptions.slingQuickstartOakTar;
+import static org.apache.sling.testing.paxexam.SlingOptions.slingResourcePresence;
+import static org.apache.sling.testing.paxexam.SlingOptions.slingScriptingJavascript;
+import static org.ops4j.pax.exam.CoreOptions.composite;
+import static org.ops4j.pax.exam.CoreOptions.junitBundles;
+import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.factoryConfiguration;
public abstract class RewriterTestSupport extends TestSupport {
+ @Inject
+ protected ServletResolver servletResolver;
+
+ @Inject
+ protected HttpService httpService;
+
+ @Inject
+ @Filter(value = "(path=/content/rewriter)")
+ private ResourcePresence resourcePresence;
+
@Configuration
public Option[] configuration() {
return new Option[]{
baseConfiguration(),
- launchpad(),
+ quickstart(),
// Sling Rewriter
testBundle("bundle.filename"),
+ slingCommonsHtml(),
+ factoryConfiguration("org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended")
+ .put("user.mapping", new String[]{"org.apache.sling.rewriter=sling-readall"})
+ .asOption(),
+ factoryConfiguration("org.apache.sling.resource.presence.internal.ResourcePresenter")
+ .put("path", "/content/rewriter")
+ .asOption(),
// testing
mavenBundle().groupId("org.jsoup").artifactId("jsoup").versionAsInProject(),
mavenBundle().groupId("org.apache.servicemix.bundles").artifactId("org.apache.servicemix.bundles.hamcrest").versionAsInProject(),
+ slingResourcePresence(),
junitBundles()
};
}
@@ -52,18 +77,16 @@ public abstract class RewriterTestSupport extends TestSupport {
public TestProbeBuilder probeConfiguration(final TestProbeBuilder testProbeBuilder) {
testProbeBuilder.setHeader("Sling-Initial-Content",
"apps/esp;path:=/apps/esp;overwrite:=true;uninstall:=true" + "," +
- "content;path:=/content;overwrite:=true;uninstall:=true"
+ "content;path:=/content;overwrite:=true;uninstall:=true"
);
return testProbeBuilder;
}
- protected Option launchpad() {
+ protected Option quickstart() {
final int httpPort = findFreePort();
final String workingDirectory = workingDirectory();
return composite(
- slingLaunchpadOakTar(workingDirectory, httpPort),
- slingCommonsHtml(),
- slingCommonsMetrics(),
+ slingQuickstartOakTar(workingDirectory, httpPort),
slingScriptingJavascript()
);
}
[sling-org-apache-sling-rewriter] 01/02: fix typo
Posted by ol...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-rewriter.git
commit 72abe36da73bfb5b28f953a82267075f2b6774d2
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Wed Jun 19 20:17:38 2019 +0200
fix typo
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 4065597..ac5249e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
<name>Apache Sling Rewriter</name>
<description>
- The Apache Sling rewriter allows configurable post processing of any output
+ The Apache Sling Rewriter allows configurable post processing of any output
from Apache Sling. The output can be processed by a configurable processor
or a configurable pipeline.
</description>