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")) ); }
@Configuration public Option[] uberJarWithJdkServiceLoading() { return options( frameworkProperty(OSGI_LOADING).value("false"), gradleBundle("org.ehcache:dist"), baseConfiguration("SimpleOsgiTest", "uberJarWithJdkServiceLoading") ); }
when( debug ).useOptions( debugConfiguration( "5005", true ) ), karafDistributionConfiguration() .frameworkUrl( paxExamEnvironment.getProperty( "org.ops4j.pax.exam.container.karaf.distroUrl" ) ) ), configureConsole().ignoreLocalConsole().ignoreRemoteShell(), when( debug ).useOptions( keepRuntimeFolder() ), logLevel( LogLevelOption.LogLevel.INFO ),
@Override public boolean shouldUpdate() { if (!updateUsed) { super.update(isSnapshot() != null && isSnapshot()); } return super.shouldUpdate(); }
public MavenArtifactProvisionOption versionAsInProject() { artifact.versionAsInProject(); return itself(); }
public MavenArtifactProvisionOption artifactId(final String artifactId) { artifact.artifactId(artifactId); return itself(); }
public MavenArtifactProvisionOption classifier(String classifier) { artifact.classifier(classifier); return itself(); }
public T startLevel(final Integer startLevel) { delegate.startLevel(startLevel); return itself(); }
@Configuration public Option[] uberJar() { return options( gradleBundle("org.ehcache:dist"), gradleBundle("org.ehcache:transactions"), wrappedGradleBundle("javax.transaction:jta") .instructions("Fragment-Host=org.apache.felix.framework"), wrappedGradleBundle("org.codehaus.btm:btm"), baseConfiguration("TransactionalOsgiTest", "uberJar") ); }
/** * If condition is true will return the composite options. Otherwise will return an empty array * of options. */ public Option[] getOptions() { if (condition.evaluate()) { return composite.getOptions(); } return new Option[0]; }
@Configuration public Option[] uberJarWithJdkServiceLoading() { return options( frameworkProperty(OSGI_LOADING).value("false"), gradleBundle("org.ehcache:dist"), baseConfiguration("OffHeapOsgiTest", "uberJarWithJdkServiceLoading") ); }
@Override public boolean shouldUpdate() { if (!updateUsed) { super.update(isSnapshot() != null && isSnapshot()); } return super.shouldUpdate(); }
@Configuration public Option[] individualModules() { return options( gradleBundle("org.ehcache.modules:api"), gradleBundle("org.ehcache.modules:core"), gradleBundle("org.ehcache.modules:impl"), gradleBundle("org.ehcache.modules:xml"), gradleBundle("org.ehcache:transactions"), wrappedGradleBundle("org.terracotta:statistics"), wrappedGradleBundle("org.ehcache:sizeof"), wrappedGradleBundle("org.terracotta:offheap-store"), wrappedGradleBundle("javax.transaction:jta") .instructions("Fragment-Host=org.apache.felix.framework"), wrappedGradleBundle("org.codehaus.btm:btm"), baseConfiguration("TransactionalOsgiTest", "individualModules") ); }