You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2020/01/24 15:47:37 UTC
[cxf] 01/02: fix OSGi tests after Central Repository is Moving to
HTTPS
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch 3.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit ecf6a56c325638c027e7e1867417310274602c9a
Author: Alexey Markevich <bu...@gmail.com>
AuthorDate: Thu Jan 16 14:28:28 2020 +0300
fix OSGi tests after Central Repository is Moving to HTTPS
(cherry picked from commit 3bc04a93816d7d60e0d5ee8dbd6397cf26ec7ae8)
(cherry picked from commit 3a2dfead4f48b9c9e41e48eddb512c1dfe3c046c)
# Conflicts:
# osgi/itests/src/test/java/org/apache/cxf/osgi/itests/CXFOSGiTestSupport.java
# services/sts/systests/sts-itests/src/test/java/org/apache/cxf/systest/sts/itests/BasicSTSIntegrationTest.java
# services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/BasicIntegrationTest.java
---
.../java/org/apache/cxf/osgi/itests/CXFOSGiTestSupport.java | 7 +++++++
.../cxf/systest/sts/itests/BasicSTSIntegrationTest.java | 7 +++++++
.../org/apache/cxf/xkms/itests/BasicIntegrationTest.java | 13 +++++++------
3 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/CXFOSGiTestSupport.java b/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/CXFOSGiTestSupport.java
index 72a6a41..94ae0b9 100644
--- a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/CXFOSGiTestSupport.java
+++ b/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/CXFOSGiTestSupport.java
@@ -55,6 +55,11 @@ import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.replaceCo
*/
public class CXFOSGiTestSupport {
+ // Adding apache snapshots as cxf trunk may contain snapshot dependencies
+ // https://blog.sonatype.com/central-repository-moving-to-https
+ private static final String REPOS = "https://repo1.maven.org/maven2@id=central,"
+ + "http://repository.apache.org/content/groups/snapshots-group@id=apache@snapshots@noreleases";
+
@Inject
protected BundleContext bundleContext;
@@ -98,6 +103,8 @@ public class CXFOSGiTestSupport {
systemProperty("java.awt.headless").value("true"),
replaceConfigurationFile("etc/org.ops4j.pax.logging.cfg",
new File("src/test/resources/etc/org.ops4j.pax.logging.cfg")),
+ editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg",
+ "org.ops4j.pax.url.mvn.repositories", REPOS),
when(localRepo != null)
.useOptions(editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg",
"org.ops4j.pax.url.mvn.localRepository",
diff --git a/services/sts/systests/sts-itests/src/test/java/org/apache/cxf/systest/sts/itests/BasicSTSIntegrationTest.java b/services/sts/systests/sts-itests/src/test/java/org/apache/cxf/systest/sts/itests/BasicSTSIntegrationTest.java
index c9c1c21..82a5a83 100644
--- a/services/sts/systests/sts-itests/src/test/java/org/apache/cxf/systest/sts/itests/BasicSTSIntegrationTest.java
+++ b/services/sts/systests/sts-itests/src/test/java/org/apache/cxf/systest/sts/itests/BasicSTSIntegrationTest.java
@@ -40,6 +40,11 @@ import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.replaceCo
@ExamReactorStrategy(PerClass.class)
public class BasicSTSIntegrationTest {
+ // Adding apache snapshots as cxf trunk may contain snapshot dependencies
+ // https://blog.sonatype.com/central-repository-moving-to-https
+ private static final String REPOS = "https://repo1.maven.org/maven2@id=central,"
+ + "http://repository.apache.org/content/groups/snapshots-group@id=apache@snapshots@noreleases";
+
@Configuration
public Option[] getConfig() {
String port = TestUtil.getPortNumber(BasicSTSIntegrationTest.class);
@@ -69,6 +74,8 @@ public class BasicSTSIntegrationTest {
copy("clientstore.jks"),
copy("etc/org.ops4j.pax.logging.cfg"),
editConfigurationFilePut("etc/org.ops4j.pax.web.cfg", "org.osgi.service.http.port", port),
+ editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg",
+ "org.ops4j.pax.url.mvn.repositories", REPOS),
when(localRepository != null)
.useOptions(editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg",
"org.ops4j.pax.url.mvn.localRepository",
diff --git a/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/BasicIntegrationTest.java b/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/BasicIntegrationTest.java
index 62ee789..2ff23ed 100644
--- a/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/BasicIntegrationTest.java
+++ b/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/BasicIntegrationTest.java
@@ -53,8 +53,9 @@ import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.replaceCo
public class BasicIntegrationTest {
// Adding apache snapshots as cxf trunk may contain snapshot dependencies
- //private static final String REPOS = "http://repo1.maven.org/maven2@id=central, "
- // + "http://repository.apache.org/content/groups/snapshots-group@snapshots@noreleases@id=apache-snapshots ";
+ // https://blog.sonatype.com/central-repository-moving-to-https
+ private static final String REPOS = "https://repo1.maven.org/maven2@id=central,"
+ + "http://repository.apache.org/content/groups/snapshots-group@id=apache@snapshots@noreleases";
@Inject
protected XKMSPortType xkmsService;
@@ -92,8 +93,8 @@ public class BasicIntegrationTest {
copy("data/xkms/certificates/dave.cer"),
copy("data/xkms/certificates/http___localhost_8080_services_TestService.cer"),
copy("etc/org.ops4j.pax.logging.cfg"),
- // editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg",
- // "org.ops4j.pax.url.mvn.repositories", REPOS),
+ editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg",
+ "org.ops4j.pax.url.mvn.repositories", REPOS),
editConfigurationFilePut("etc/org.ops4j.pax.web.cfg",
"org.osgi.service.http.port", port),
editConfigurationFilePut("etc/org.apache.cxf.xkms.client.cfg",
@@ -143,8 +144,8 @@ public class BasicIntegrationTest {
copy("data/xkms/certificates/dave.cer"),
copy("data/xkms/certificates/http___localhost_8080_services_TestService.cer"),
copy("etc/org.ops4j.pax.logging.cfg"),
- // editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg",
- // "org.ops4j.pax.url.mvn.repositories", REPOS),
+ editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg",
+ "org.ops4j.pax.url.mvn.repositories", REPOS),
editConfigurationFilePut("etc/org.ops4j.pax.web.cfg",
"org.osgi.service.http.port", port),
editConfigurationFilePut("etc/org.apache.cxf.xkms.client.cfg",