@Configuration public Option[] uberJarWithJdkServiceLoading() { return options( frameworkProperty(OSGI_LOADING).value("false"), gradleBundle("org.ehcache:dist"), baseConfiguration("OffHeapOsgiTest", "uberJarWithJdkServiceLoading") ); }
@Configuration public Option[] uberJarWithJdkServiceLoading() { return options( frameworkProperty(OSGI_LOADING).value("false"), gradleBundle("org.ehcache:dist"), baseConfiguration("SimpleOsgiTest", "uberJarWithJdkServiceLoading") ); }
private static void parseConfigIni(InputStream stream, List<Option> options, EclipseBundleSource bundleSource, URL baseUrl) throws IOException { Properties properties = new Properties(); properties.load(stream); Set<String> names = properties.stringPropertyNames(); for (String key : names) { if ("osgi.framework".equals(key)) { // ignore framework setting since we start the framework ourself, and Eclipse can // throw exceptions when using relative path here see // https://bugs.eclipse.org/bugs/show_bug.cgi?id=527175 continue; } String value = properties.getProperty(key); if ("org.eclipse.equinox.simpleconfigurator.configUrl".equals(key)) { URL url = new URL(baseUrl, value); parseSimpleConfigurator(url.openStream(), options, bundleSource); value = value + ".disabled"; } options.add(CoreOptions.frameworkProperty(key).value(value)); } }
@Configuration public Option[] config() { return new Option[] { CoreOptions.systemProperty("ogema.resources.useByteCodeGeneration").value("true"), CoreOptions.frameworkProperty("osgi.console").value("true"), CoreOptions.frameworkProperty("osgi.console.enable.builtin").value("true"), CoreOptions.frameworkProperty("org.osgi.service.http.port").value(Integer.toString(HTTP_PORT)), CoreOptions.frameworkProperty("org.osgi.framework.bsnversion").value("multiple"), CoreOptions.frameworkProperty(Constants.FRAMEWORK_SYSTEMCAPABILITIES_EXTRA).value("osgi.contract;osgi.contract=\"JavaServlet\";version:Version=\"3.1\""), // CoreOptions.systemProperty("org.ogema.security").value("on"), CoreOptions.junitBundles(), // load the bundle of the extending class directly from maven build dir: CoreOptions.when(includeTestBundle) .useOptions(CoreOptions.bundle("reference:file:target/classes/").start()), CoreOptions.composite(frameworkBundles()), // ogemaWebFrontentOption(), // wicketGuiOption(), // webConsoleOption(), // felixGogoShellOption(), }; }
/** * Set default launchpad options * @param launchpadVersion null means use the latest * @return Composite option */ public static CompositeOption defaultLaunchpadOptions(String launchpadVersion) { final String paxLogLevel = System.getProperty("pax.exam.log.level", "INFO"); final int slingStartLevel = DEFAULT_SLING_START_LEVEL; final String telnetPort = System.getProperty(PROP_TELNET_PORT, String.valueOf(getAvailablePort())); final String httpPort = System.getProperty(PROP_HTTP_PORT, String.valueOf(getAvailablePort())); log.info("{}={}", PROP_TELNET_PORT, telnetPort); log.info("{}={}", PROP_HTTP_PORT, httpPort); return new DefaultCompositeOption( junitBundles(), systemProperty( "org.ops4j.pax.logging.DefaultServiceLog.level" ).value(paxLogLevel), SlingPaxOptions.felixRemoteShellBundles(), SlingPaxOptions.slingBootstrapBundles(), SlingPaxOptions.slingLaunchpadBundles(launchpadVersion), CoreOptions.frameworkStartLevel(slingStartLevel), CoreOptions.frameworkProperty(PROP_TELNET_PORT).value(telnetPort), CoreOptions.frameworkProperty(PROP_HTTP_PORT).value(httpPort) ); }
@Override public EclipseApplicationOption ignoreApp() { provision.option(CoreOptions.frameworkProperty("eclipse.ignoreApp").value(true)); return product(null).application(null); }
@Configuration public Option[] config() { return new Option[] { CoreOptions.systemProperty("ogema.resources.useByteCodeGeneration").value("true"), CoreOptions.frameworkProperty("osgi.console").value("true"), CoreOptions.frameworkProperty("osgi.console.enable.builtin").value("true"), CoreOptions.frameworkProperty("org.osgi.service.http.port").value(Integer.toString(HTTP_PORT)), CoreOptions.frameworkProperty("org.osgi.framework.bsnversion").value("multiple"), // CoreOptions.systemProperty("org.ogema.security").value("on"), CoreOptions.junitBundles(), // load the bundle of the extending class directly from maven build dir: CoreOptions.when(includeTestBundle) .useOptions(CoreOptions.bundle("reference:file:target/classes/").start()), CoreOptions.composite(frameworkBundles()), // ogemaWebFrontentOption(), // wicketGuiOption(), // webConsoleOption(), // felixGogoShellOption(), }; }
public static Option paxCdiWithWeldBundles() { Properties props = new Properties(); try { props.load(TestConfiguration.class.getResourceAsStream("/systemPackages.properties")); } catch (IOException exc) { throw new Ops4jException(exc); } return composite( // do not treat javax.annotation as system package when(isEquinox()).useOptions( frameworkProperty("org.osgi.framework.system.packages").value( props.get("org.osgi.framework.system.packages"))), linkBundle("org.ops4j.pax.cdi.weld"), // there is a classloader conflict when adding this dep to the POM mavenBundle("org.ops4j.pax.cdi", "pax-cdi-undertow-weld", PAX_CDI_VERSION), mavenBundle("com.google.guava", "guava", "13.0.1"), mavenBundle("org.jboss.weld", "weld-osgi-bundle", "2.2.8.Final")); }
frameworkProperty("felix.bootdelegation.implicit").value("false"));
public static Option paxCdiWithOwbBundles() { Properties props = new Properties(); try { props.load(TestConfiguration.class.getResourceAsStream("/systemPackages.properties")); } catch (IOException exc) { throw new Ops4jException(exc); } return composite( // do not treat javax.annotation as system package when(isEquinox()).useOptions( frameworkProperty("org.osgi.framework.system.packages").value( props.get("org.osgi.framework.system.packages"))), linkBundle("org.ops4j.pax.cdi.openwebbeans"), // there is a classloader conflict when adding this dep to the POM mavenBundle("org.ops4j.pax.cdi", "pax-cdi-undertow-openwebbeans", PAX_CDI_VERSION), mavenBundle("org.apache.openwebbeans", "openwebbeans-impl", "1.5.0"), mavenBundle("org.apache.openwebbeans", "openwebbeans-spi", "1.5.0"), mavenBundle("org.apache.openwebbeans", "openwebbeans-web", "1.5.0"), mavenBundle("org.apache.openwebbeans", "openwebbeans-el22", "1.5.0"), // needed by pax-cdi-web-openwebbeans mavenBundle("org.apache.geronimo.specs", "geronimo-jsp_2.2_spec", "1.2"), mavenBundle("org.apache.xbean", "xbean-asm6-shaded", "4.6"), // mavenBundle("org.apache.xbean", "xbean-finder-shaded", "4.6"), // //mavenBundle("org.slf4j", "jul-to-slf4j").versionAsInProject(), mavenBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec", "1.1.1"), mavenBundle("javax.validation", "validation-api", "1.1.0.Final"), mavenBundle("javax.interceptor", "javax.interceptor-api", "1.2"), mavenBundle("javax.el", "javax.el-api", "3.0.0")); }
bundle("link:classpath:META-INF/links/org.ops4j.pax.exam.invoker.junit.link")), , frameworkProperty("org.osgi.framework.system.packages.extra").value("sun.misc"), // when(localRepo.length() > 0).useOptions(systemProperty("org.ops4j.pax.url.mvn.localRepository").value(localRepo))
bundle("link:classpath:META-INF/links/org.ops4j.pax.exam.invoker.junit.link")), , frameworkProperty("org.osgi.framework.system.packages.extra").value("sun.misc"), // when(localRepo.length() > 0).useOptions(systemProperty("org.ops4j.pax.url.mvn.localRepository").value(localRepo))
@Configuration public Option[] configuration() throws IOException, URISyntaxException { return CoreOptions.options( junitBundles(), mavenBundle("org.apache.felix", "org.apache.felix.scr", "2.0.12"), mavenBundle("org.osgi", "org.osgi.dto", "1.0.0"), mavenBundle( "org.apache.felix", "org.apache.felix.configadmin", "1.8.16" ), mavenBundle( "org.apache.felix", "org.apache.felix.fileinstall", "3.2.6" ), mavenBundle( "org.ops4j.pax.logging", "pax-logging-api", "1.7.2" ), frameworkProperty("repository.home").value("target"), systemProperties(new SystemPropertyOption("felix.fileinstall.dir").value(getConfigDir())), jarBundles(), jpmsOptions()); }
cleanCaches(true), junitBundles(), frameworkProperty("felix.bootdelegation.implicit").value( "false"),