@Configuration public Option[] config() { return options( junitBundles(), bundle("file:" + System.getProperty("caffeine.osgi.jar"))); }
@Configuration public Option[] config() { return options( junitBundles(), bundle("file:" + System.getProperty("caffeine.osgi.jar")), bundle("file:" + System.getProperty("caffeine-guava.osgi.jar")), mavenBundle("com.google.guava", "guava", System.getProperty("guava.osgi.version"))); }
@Configuration public Option[] config() { return options( junitBundles(), bundle("file:" + System.getProperty("caffeine.osgi.jar")), bundle("file:" + System.getProperty("caffeine-jcache.osgi.jar")), mavenBundle("com.typesafe", "config", System.getProperty("config.osgi.version")), mavenBundle("javax.cache", "cache-api", System.getProperty("jcache.osgi.version"))); }
public static Option baseConfiguration(String ... path) { return composite( gradleBundle("org.slf4j:slf4j-api"), gradleBundle("org.slf4j:slf4j-simple").noStart(), gradleBundle("org.apache.felix:org.apache.felix.scr"), systemProperty("pax.exam.osgi.unresolved.fail").value("true"), cleanCaches(true), workingDirectory(join(File.separator, "build", "osgi-container", join(File.separator, path))), junitBundles() ); }
/** * Base configuration for a Karaf container running the specified Ignite features. * * @return The configuration. */ public Option[] baseConfig() { return options( // Specify which version of Karaf to use. karafDistributionConfiguration() .frameworkUrl(maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("tar.gz") .versionAsInProject()) .karafVersion(System.getProperty("karafVersion")) .useDeployFolder(false) .unpackDirectory(new File("target/paxexam/unpack")), // Add JUnit bundles. junitBundles(), // Add the additional JRE exports that Ignite requires. editConfigurationFileExtend("etc/jre.properties", "jre-1.7", "sun.nio.ch"), editConfigurationFileExtend("etc/jre.properties", "jre-1.8", "sun.nio.ch"), // Make log level INFO. logLevel(LogLevelOption.LogLevel.INFO), // Add our features repository. features(mavenBundle() .groupId("org.apache.ignite").artifactId("ignite-osgi-karaf") .version(System.getProperty("projectVersion")).type("xml/features"), featuresToInstall().toArray(new String[0])), // Propagate the projectVersion system property. systemProperty("projectVersion").value(System.getProperty("projectVersion")) ); }
junitBundles(), systemProperty("pax.exam.osgi.unresolved.fail").value("true"), systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value(paxLoggingLevel)
/** * 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) ); }
protected static Option[] config(Option systemProperties, MavenBundleOption testDependencies) { try { return options( systemProperties, domTraversalPackage(), felixDeclarativeServices(), thisBundle(), junitBundles(), systemPackage("javax.xml.stream;version=\"1.0.1\""), systemPackage("com.sun.org.apache.xml.internal.resolver"), systemPackage("com.sun.org.apache.xml.internal.resolver.tools"), mavenBundle("org.daisy.pipeline.build:modules-test-helper:?"), mavenBundlesWithDependencies( testDependencies, // logging logbackClassic(), mavenBundle("org.slf4j:jcl-over-slf4j:1.7.2")) // required by httpclient (FIXME: add to runtime dependencies of calabash) ); } catch (RuntimeException e) { e.printStackTrace(); throw e; } } }
CoreOptions.junitBundles(),
@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(), }; }
/** * Use the same Karaf version from the project for integration testing with Pax Exam */ public static DefaultCompositeOption useDefaultKarafAsInProjectWithJunitBundles() { String karafVersion = getKarafVersionAsInProject(); MavenArtifactUrlReference karafUrl = maven().groupId(KARAF_GROUP_ID) .artifactId(KARAF_ARTIFACT_ID) .version(karafVersion) .type("tar.gz"); return new DefaultCompositeOption() .add(karafDistributionConfiguration() .frameworkUrl(karafUrl) .karafVersion(karafVersion) .name("Apache Karaf") .unpackDirectory(new File("target/exam"))) .add(keepRuntimeFolder()) .add(junitBundles()) .add(logLevel(LogLevelOption.LogLevel.INFO)); }
@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(), }; }
/** * Creates default pax exam configuration for Karaf. * @return the default configuration */ public Option[] createConfig() { final Option[] base = options( cleanCaches(), karafDistributionConfiguration() .frameworkUrl( maven().groupId("org.apache.karaf").artifactId("apache-karaf") .type("zip").versionAsInProject()) .name("Apache Karaf") .karafVersion( MavenUtils.getArtifactVersion("org.apache.karaf", "apache-karaf")) .unpackDirectory(new File("target/exam/unpack/")), keepRuntimeFolder(), junitBundles(), addCodeCoverageOption(), addMavenSettingsOptions(), mavenReposURLOptions(), loggingLevel(), addExtraOptions(), featureToTest()); final Option[] baseAndJVM = OptionUtils.combine(base, addJVMOptions()); final Option vmOption = (paxRunnerVmOption != null) ? CoreOptions .vmOption(paxRunnerVmOption) : null; return OptionUtils.combine(baseAndJVM, vmOption); } /**
/** * Creates default pax exam configuration for Karaf. * @return the default configuration */ public Option[] createConfig() { final Option[] base = options( cleanCaches(), karafDistributionConfiguration() .frameworkUrl( maven().groupId("org.apache.karaf").artifactId("apache-karaf") .type("zip").versionAsInProject()) .name("Apache Karaf") .karafVersion( MavenUtils.getArtifactVersion("org.apache.karaf", "apache-karaf")) .unpackDirectory(new File("target/exam/unpack/")), keepRuntimeFolder(), junitBundles(), addCodeCoverageOption(), addMavenSettingsOptions(), mavenReposURLOptions(), loggingLevel(), addExtraOptions(), featureToTest()); final Option[] baseAndJVM = OptionUtils.combine(base, addJVMOptions()); final Option vmOption = (paxRunnerVmOption != null) ? CoreOptions .vmOption(paxRunnerVmOption) : null; return OptionUtils.combine(baseAndJVM, vmOption); } /**
/** * Creates default pax exam configuration for Karaf. * @return the default configuration */ public Option[] createConfig() { final Option[] base = options( cleanCaches(), karafDistributionConfiguration() .frameworkUrl( maven().groupId("org.apache.karaf").artifactId("apache-karaf") .type("zip").versionAsInProject()) .name("Apache Karaf") .karafVersion( MavenUtils.getArtifactVersion("org.apache.karaf", "apache-karaf")) .unpackDirectory(new File("target/exam/unpack/")), keepRuntimeFolder(), cleanCaches(), junitBundles(), addCodeCoverageOption(), addMavenSettingsOptions(), mavenReposURLOptions(), loggingLevel(), addExtraOptions(), featureToTest()); final Option[] baseAndJVM = OptionUtils.combine(base, addJVMOptions()); final Option vmOption = (paxRunnerVmOption != null) ? CoreOptions .vmOption(paxRunnerVmOption) : null; return OptionUtils.combine(baseAndJVM, vmOption); } /**
@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()); }
workingDirectory("target/paxexam/"), cleanCaches(true), junitBundles(), frameworkProperty("felix.bootdelegation.implicit").value( "false"),