Skip to content

Commit

Permalink
#1919: 4.0.2 tag fails to run the Bundles tests
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <[email protected]>
  • Loading branch information
lukasj committed Aug 11, 2023
1 parent 33b5106 commit 13a3baa
Showing 1 changed file with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -16,6 +16,9 @@

import org.ops4j.pax.exam.Option;

import java.net.MalformedURLException;
import java.nio.file.Path;

import static org.ops4j.pax.exam.CoreOptions.bundle;
import static org.ops4j.pax.exam.CoreOptions.cleanCaches;
import static org.ops4j.pax.exam.CoreOptions.junitBundles;
Expand All @@ -41,23 +44,23 @@ public static Option[] getDefaultOptions() {

return options(
// JAXB API
bundle("file:" + PLUGINS_DIR + ACTIVATION_JAR),
bundle("file:" + PLUGINS_DIR + JAXB_API_JAR),
bundle(pathToUrl(PLUGINS_DIR + ACTIVATION_JAR)),
bundle(pathToUrl(PLUGINS_DIR + JAXB_API_JAR)),
//JAXB_OSGI
bundle("file:" + PLUGINS_DIR + JAXB_OSGI),
bundle(pathToUrl(PLUGINS_DIR + JAXB_OSGI)),

systemPackage("javax.rmi"),
systemPackage("javax.rmi.CORBA"),
systemPackage("org.omg.CORBA"),
systemPackage("org.omg.CORBA.portable"),
systemPackage("org.omg.CORBA_2_3.portable"),
// JAX-RS API
bundle("file:" + PLUGINS_DIR + JAXRS_JAR),
bundle(pathToUrl(PLUGINS_DIR + JAXRS_JAR)),

// EclipseLink bundles
bundle("file:" + PLUGINS_DIR + "org.eclipse.persistence.moxy.jar"),
bundle("file:" + PLUGINS_DIR + "org.eclipse.persistence.core.jar"),
bundle("file:" + PLUGINS_DIR + ASM_JAR),
bundle(pathToUrl(PLUGINS_DIR + "org.eclipse.persistence.moxy.jar")),
bundle(pathToUrl(PLUGINS_DIR + "org.eclipse.persistence.core.jar")),
bundle(pathToUrl(PLUGINS_DIR + ASM_JAR)),

cleanCaches(),
junitBundles());
Expand Down Expand Up @@ -87,4 +90,12 @@ public static Option[] getOptionsWithBeanValidation() {
junitBundles()
);
}

private static String pathToUrl(String path) {
try {
return Path.of(path).toUri().toURL().toExternalForm();
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
}
}

0 comments on commit 13a3baa

Please sign in to comment.