private static Option[] defaultTestSystemOptions() { ConfigurationManager cm = new ConfigurationManager(); String logging = cm.getProperty(Constants.EXAM_LOGGING_KEY, Constants.EXAM_LOGGING_PAX_LOGGING); return new Option[] { bootDelegationPackage("sun.*"), frameworkStartLevel(Constants.START_LEVEL_TEST_BUNDLE), url("link:classpath:META-INF/links/org.ops4j.pax.exam.link").startLevel( START_LEVEL_SYSTEM_BUNDLES), url("link:classpath:META-INF/links/org.ops4j.pax.extender.service.link").startLevel( START_LEVEL_SYSTEM_BUNDLES), when(logging.equals(Constants.EXAM_LOGGING_PAX_LOGGING)).useOptions( url("link:classpath:META-INF/links/org.ops4j.pax.logging.api.link").startLevel( START_LEVEL_SYSTEM_BUNDLES)), url("link:classpath:META-INF/links/org.ops4j.base.link").startLevel( START_LEVEL_SYSTEM_BUNDLES), url("link:classpath:META-INF/links/org.ops4j.pax.swissbox.core.link").startLevel( START_LEVEL_SYSTEM_BUNDLES), url("link:classpath:META-INF/links/org.ops4j.pax.swissbox.extender.link").startLevel( START_LEVEL_SYSTEM_BUNDLES), url("link:classpath:META-INF/links/org.ops4j.pax.swissbox.framework.link").startLevel( START_LEVEL_SYSTEM_BUNDLES), url("link:classpath:META-INF/links/org.ops4j.pax.swissbox.lifecycle.link").startLevel( START_LEVEL_SYSTEM_BUNDLES), url("link:classpath:META-INF/links/org.ops4j.pax.swissbox.tracker.link").startLevel( START_LEVEL_SYSTEM_BUNDLES), url("link:classpath:META-INF/links/org.apache.geronimo.specs.atinject.link") .startLevel(START_LEVEL_SYSTEM_BUNDLES) }; }
public static Option projectToOption(ProjectParser context, ProvisionControl<?> control) throws IOException { byte[] byteArray = projectToByteArray(context); UrlProvisionOption bundle = CoreOptions.streamBundle(new ByteArrayInputStream(byteArray)); if (control != null) { bundle.startLevel(control.getStartLevel()); bundle.start(control.shouldStart()); bundle.update(control.shouldUpdate()); } return bundle; }
@Override protected Option toOption() { URL url = getBundleInfo().getContext().getUrl(); File cacheFile = P2Cache.getCacheFile(url); UrlProvisionOption bundle; if (cacheFile.exists()) { bundle = CoreOptions.bundle(cacheFile.toURI().toASCIIString()); } else { bundle = CoreOptions.bundle(url.toExternalForm()); } bundle.startLevel(getStartLevel()); bundle.start(shouldStart()); bundle.update(shouldUpdate()); return bundle; }
@Override protected Option toOption() { UrlProvisionOption bundle = CoreOptions .bundle(getBundleInfo().getContext().getAbsolutePath()); bundle.startLevel(getStartLevel()); bundle.start(shouldStart()); bundle.update(shouldUpdate()); return bundle; }
bundle.set(Constants.BUNDLE_ACTIVATOR, ConfigurationOptionActivator.class.getName()); bundle.set(Constants.BUNDLE_MANIFESTVERSION, "2"); return CoreOptions.streamBundle(bundle.build()).startLevel(1).start(true).update(false);
bundle.set(Constants.BUNDLE_ACTIVATOR, ConfigurationOptionActivator.class.getName()); bundle.set(Constants.BUNDLE_MANIFESTVERSION, "2"); return CoreOptions.streamBundle(bundle.build()).startLevel(1).start(true).update(false);
url("link:classpath:META-INF/links/org.ops4j.base.link").startLevel(START_LEVEL_SYSTEM_BUNDLES), url("link:classpath:META-INF/links/org.ops4j.pax.swissbox.core.link").startLevel(START_LEVEL_SYSTEM_BUNDLES), url("link:classpath:META-INF/links/org.ops4j.pax.swissbox.extender.link").startLevel(START_LEVEL_SYSTEM_BUNDLES), url("link:classpath:META-INF/links/org.ops4j.pax.swissbox.framework.link").startLevel(START_LEVEL_SYSTEM_BUNDLES), url("link:classpath:META-INF/links/org.ops4j.pax.swissbox.lifecycle.link").startLevel(START_LEVEL_SYSTEM_BUNDLES), url("link:classpath:META-INF/links/org.ops4j.pax.swissbox.tracker.link").startLevel(START_LEVEL_SYSTEM_BUNDLES), url("link:classpath:META-INF/links/org.ops4j.pax.exam.link").startLevel(START_LEVEL_SYSTEM_BUNDLES), url("link:classpath:META-INF/links/org.ops4j.pax.exam.inject.link").startLevel(START_LEVEL_SYSTEM_BUNDLES), url("link:classpath:META-INF/links/org.ops4j.pax.extender.service.link").startLevel(START_LEVEL_SYSTEM_BUNDLES), linkBundle("org.apache.felix.configadmin").startLevel(START_LEVEL_SYSTEM_BUNDLES), linkBundle("org.ops4j.pax.logging.pax-logging-api").startLevel(START_LEVEL_SYSTEM_BUNDLES), linkBundle("org.ops4j.pax.logging.pax-logging-log4j2").startLevel(START_LEVEL_SYSTEM_BUNDLES), linkBundle("org.apache.servicemix.bundles.javax-inject").startLevel(START_LEVEL_SYSTEM_BUNDLES),