/** * Creates a composite option of {@link BootDelegationOption}s. * * @param packages * boot delegation packages (cannot be null or containing null entries) * * @return composite option of boot delegation package options * * @throws IllegalArgumentException * - If urls array is null or contains null entries */ public static Option bootDelegationPackages(final String... packages) { validateNotEmptyContent(packages, true, "Packages"); final List<BootDelegationOption> options = new ArrayList<BootDelegationOption>(); for (String pkg : packages) { options.add(bootDelegationPackage(pkg)); } return bootDelegationPackages(options.toArray(new BootDelegationOption[options.size()])); }
private static Option[] defaultServerSystemOptions() { return new Option[] { bootDelegationPackage("sun.*"), serverMode() }; }
/** * Creates a composite option of {@link BootDelegationOption}s. * * @param packages * boot delegation packages (cannot be null or containing null entries) * * @return composite option of boot delegation package options * * @throws IllegalArgumentException * - If urls array is null or contains null entries */ public static Option bootDelegationPackages(final String... packages) { validateNotEmptyContent(packages, true, "Packages"); final List<BootDelegationOption> options = new ArrayList<BootDelegationOption>(); for (String pkg : packages) { options.add(bootDelegationPackage(pkg)); } return bootDelegationPackages(options.toArray(new BootDelegationOption[options.size()])); }
@Configuration public Option[] config() throws IOException { return new Option[] { bootDelegationPackage("javax.crypto"), bootDelegationPackage("javax.crypto.interfaces"), bootDelegationPackage("javax.crypto.spec"), getKarafDistroOption(), vmOptions("-Xmx2048m","-XX:MaxPermSize=512m"), keepRuntimeFolder(), configureConsole().ignoreLocalConsole(), logLevel(LogLevel.WARN), mvnLocalRepoOption(), editConfigurationFilePut(ORG_OPS4J_PAX_LOGGING_CFG,LOG4J_LOGGER_ORG_OPENDAYLIGHT_YANGTOOLS_FEATURETEST,LogLevel.INFO.name()), CoreOptions.systemProperty(ORG_OPENDAYLIGHT_FEATURETEST_URI_PROP).value(System.getProperty(ORG_OPENDAYLIGHT_FEATURETEST_URI_PROP)), CoreOptions.systemProperty(ORG_OPENDAYLIGHT_FEATURETEST_FEATURENAME_PROP).value(System.getProperty(ORG_OPENDAYLIGHT_FEATURETEST_FEATURENAME_PROP)), CoreOptions.systemProperty(ORG_OPENDAYLIGHT_FEATURETEST_FEATUREVERSION_PROP).value(System.getProperty(ORG_OPENDAYLIGHT_FEATURETEST_FEATUREVERSION_PROP)), }; }
/** * Return the options required by this container implementation. * * @return local options */ private Option[] localOptions() { return new Option[] { // remote bundle context bundle mavenBundle().groupId( "org.ops4j.pax.exam" ).artifactId( "pax-exam-container-rbc" ).version( Info.getPaxExamVersion() ).update( Info.isPaxExamSnapshotVersion() ).startLevel( START_LEVEL_SYSTEM_BUNDLES ), // rmi communication port systemProperty( Constants.RMI_PORT_PROPERTY ).value( m_remoteBundleContextClient.getRmiPort().toString() ), // boot delegation for sun.*. This seems only necessary in Knopflerfish version > 2.0.0 bootDelegationPackage( "sun.*" ) }; }
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) }; }
protected static Option[] baseConfigure() { return options( bootDelegationPackage("sun.*"), bootDelegationPackage("com.sun.*"), frameworkStartLevel(START_LEVEL_TEST_BUNDLE), workingDirectory("target/paxexam"),