This is an automated email from the ASF dual-hosted git repository. coheigea pushed a commit to branch 3.3.x-fixes in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 3a2dfead4f48b9c9e41e48eddb512c1dfe3c046c Author: Alexey Markevich <[email protected]> AuthorDate: Thu Jan 16 14:28:28 2020 +0300 fix OSGi tests after Central Repository is Moving to HTTPS (cherry picked from commit 3bc04a93816d7d60e0d5ee8dbd6397cf26ec7ae8) --- .../java/org/apache/cxf/osgi/itests/CXFOSGiTestSupport.java | 9 +++++++++ .../cxf/systest/sts/itests/BasicSTSIntegrationTest.java | 9 +++++++++ .../org/apache/cxf/xkms/itests/BasicIntegrationTest.java | 13 +++++++------ 3 files changed, 25 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 47dc108..b25eb07 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 @@ -50,6 +50,11 @@ import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDist */ 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; @@ -90,6 +95,8 @@ public class CXFOSGiTestSupport { //debugConfiguration(), // nor this systemProperty("pax.exam.osgi.unresolved.fail").value("true"), systemProperty("java.awt.headless").value("true"), + 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", @@ -134,6 +141,8 @@ public class CXFOSGiTestSupport { //debugConfiguration(), // nor this systemProperty("pax.exam.osgi.unresolved.fail").value("true"), systemProperty("java.awt.headless").value("true"), + 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 9064b65..7a1a3c0 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 @@ -42,6 +42,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 { .useDeployFolder(false), systemProperty("java.awt.headless").value("true"), systemProperty("BasicSTSIntegrationTest.PORT").value(port), + editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg", + "org.ops4j.pax.url.mvn.repositories", REPOS), copy("clientKeystore.properties"), copy("clientstore.jks"), editConfigurationFilePut("etc/org.ops4j.pax.web.cfg", @@ -112,6 +119,8 @@ public class BasicSTSIntegrationTest { .useDeployFolder(false), systemProperty("java.awt.headless").value("true"), systemProperty("BasicSTSIntegrationTest.PORT").value(port), + editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg", + "org.ops4j.pax.url.mvn.repositories", REPOS), copy("clientKeystore.properties"), copy("clientstore.jks"), editConfigurationFilePut("etc/org.ops4j.pax.web.cfg", 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 669aead..f3b0eea 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; @@ -91,8 +92,8 @@ public class BasicIntegrationTest { copy("data/xkms/certificates/cas/alice.cer"), copy("data/xkms/certificates/dave.cer"), copy("data/xkms/certificates/http___localhost_8080_services_TestService.cer"), - // 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", @@ -150,8 +151,8 @@ public class BasicIntegrationTest { copy("data/xkms/certificates/cas/alice.cer"), copy("data/xkms/certificates/dave.cer"), copy("data/xkms/certificates/http___localhost_8080_services_TestService.cer"), - // 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",
