Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1919: 4.0.2 tag fails to run the Bundles tests #1921

Merged
merged 1 commit into from
Aug 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}
}
}