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/05/28 12:32:49 UTC
[sling-org-apache-sling-testing-paxexam] 01/04: Revert "SLING-8432
- Provide support for running the Pax tests on Java 9 and higher"
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-testing-paxexam.git
commit 1a1bdda7ce74308b833501ace05809095970d0f4
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue May 28 14:25:16 2019 +0200
Revert "SLING-8432 - Provide support for running the Pax tests on Java 9 and higher"
This reverts commit 0e00509be90f91c42450c7fcc0179c82f388676b.
---
pom.xml | 8 ++---
.../apache/sling/testing/paxexam/TestSupport.java | 34 ----------------------
.../paxexam/it/SlingOptionsTestSupport.java | 3 --
3 files changed, 4 insertions(+), 41 deletions(-)
diff --git a/pom.xml b/pom.xml
index 75efa0a..d57426b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,8 +23,8 @@
<parent>
<groupId>org.apache.sling</groupId>
- <artifactId>sling-bundle-parent</artifactId>
- <version>35</version>
+ <artifactId>sling</artifactId>
+ <version>34</version>
<relativePath />
</parent>
@@ -37,8 +37,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
- <sling.java.version>8</sling.java.version>
- <org.ops4j.pax.exam.version>4.13.1</org.ops4j.pax.exam.version>
+ <sling.java.version>7</sling.java.version>
+ <org.ops4j.pax.exam.version>4.13.0</org.ops4j.pax.exam.version>
</properties>
<scm>
diff --git a/src/main/java/org/apache/sling/testing/paxexam/TestSupport.java b/src/main/java/org/apache/sling/testing/paxexam/TestSupport.java
index 349476d..d21eaf4 100644
--- a/src/main/java/org/apache/sling/testing/paxexam/TestSupport.java
+++ b/src/main/java/org/apache/sling/testing/paxexam/TestSupport.java
@@ -21,7 +21,6 @@ package org.apache.sling.testing.paxexam;
import java.io.File;
import java.io.IOException;
import java.net.ServerSocket;
-import java.util.Arrays;
import java.util.Dictionary;
import java.util.UUID;
@@ -33,26 +32,21 @@ import org.ops4j.pax.exam.options.ModifiableCompositeOption;
import org.ops4j.pax.exam.util.PathUtils;
import org.ops4j.pax.tinybundles.core.TinyBundle;
import org.osgi.service.cm.ConfigurationAdmin;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import static org.apache.sling.testing.paxexam.SlingOptions.paxTinybundles;
import static org.ops4j.pax.exam.CoreOptions.bundle;
import static org.ops4j.pax.exam.CoreOptions.composite;
-import static org.ops4j.pax.exam.CoreOptions.frameworkProperty;
import static org.ops4j.pax.exam.CoreOptions.keepCaches;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.repository;
import static org.ops4j.pax.exam.CoreOptions.streamBundle;
import static org.ops4j.pax.exam.CoreOptions.systemProperty;
-import static org.ops4j.pax.exam.CoreOptions.vmOption;
import static org.ops4j.pax.exam.CoreOptions.when;
import static org.ops4j.pax.tinybundles.core.TinyBundles.withBnd;
public abstract class TestSupport {
private final String workingDirectory = String.format("%s/target/paxexam/%s/%s", PathUtils.getBaseDir(), getClass().getSimpleName(), UUID.randomUUID());
- private final Logger logger = LoggerFactory.getLogger(getClass());
@Inject
protected ConfigurationAdmin configurationAdmin;
@@ -116,32 +110,4 @@ public abstract class TestSupport {
).start();
}
- public Option jvmSetup() {
- Option[] configuration = new Option[0];
- try {
- int javaVersion = Integer.parseInt(System.getProperty("java.specification.version"));
- if (javaVersion >= 9 && javaVersion < 11) {
- configuration = Arrays.copyOf(configuration, configuration.length + 1);
- configuration[configuration.length - 1] = vmOption("--add-modules=java.se.ee");
- logger.info("Using the following options for Java {}:\n{}", javaVersion, configuration);
- }
- if (javaVersion >= 11) {
- configuration = Arrays.copyOf(configuration, configuration.length + 1);
- configuration[configuration.length -1] = composite(
- frameworkProperty("org.osgi.framework.system.packages.extra")
- .value("javax.xml.stream;version=\"1.1.0\",javax.xml.stream.events;" +
- "version=\"1.1.0\""),
- mavenBundle("org.apache.geronimo.specs", "geronimo-annotation_1.3_spec", "1.1"),
- mavenBundle("org.apache.geronimo.specs", "geronimo-activation_1.1_spec", "1.1"),
- mavenBundle("org.apache.servicemix.specs", "org.apache.servicemix.specs.jaxb-api-2.2", "2.9.0"),
- mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.jaxb-impl", "2.2.11_1")
- );
- logger.info("Using the following options for Java {}:\n{}", javaVersion, configuration);
- }
- } catch (NumberFormatException e) {
- logger.info("No special setup needed for Java 8.");
- }
- return CoreOptions.composite(configuration);
- }
-
}
diff --git a/src/test/java/org/apache/sling/testing/paxexam/it/SlingOptionsTestSupport.java b/src/test/java/org/apache/sling/testing/paxexam/it/SlingOptionsTestSupport.java
index ee2aa74..02e8504 100644
--- a/src/test/java/org/apache/sling/testing/paxexam/it/SlingOptionsTestSupport.java
+++ b/src/test/java/org/apache/sling/testing/paxexam/it/SlingOptionsTestSupport.java
@@ -21,7 +21,6 @@ package org.apache.sling.testing.paxexam.it;
import java.io.File;
import java.util.UUID;
-import org.apache.sling.testing.paxexam.TestSupport;
import org.ops4j.pax.exam.CoreOptions;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.util.PathUtils;
@@ -41,9 +40,7 @@ public abstract class SlingOptionsTestSupport {
}
protected Option baseConfiguration() {
- TestSupport testSupport = new TestSupport() {};
return composite(
- testSupport.jvmSetup(),
failOnUnresolvedBundles(),
keepCaches(),
localMavenRepo(),