use of org.ops4j.pax.exam.Configuration in project sling by apache.
the class LogTestBase method config.
@Configuration
public Option[] config() throws IOException {
final String bundleFileName = System.getProperty(BUNDLE_JAR_SYS_PROP, BUNDLE_JAR_DEFAULT);
final File bundleFile = new File(bundleFileName);
if (!bundleFile.canRead()) {
throw new IllegalArgumentException("Cannot read from bundle file " + bundleFileName + " specified in the " + BUNDLE_JAR_SYS_PROP + " system property. Try building the project first " + "with 'mvn clean install -Pide -DskipTests'");
}
return options(// the current project (the bundle under test)
CoreOptions.bundle(bundleFile.toURI().toString()), repository("https://repository.apache.org/snapshots/").id("apache-snapshots").allowSnapshots(), mavenBundle("org.slf4j", "slf4j-api").versionAsInProject(), mavenBundle("org.apache.sling", "org.apache.sling.commons.logservice").versionAsInProject(), LogTestBase.webSupport(), mavenBundle("org.apache.sling", "org.apache.sling.commons.log").versionAsInProject(), mavenBundle("org.apache.felix", "org.apache.felix.http.jetty").versionAsInProject(), mavenBundle("org.apache.felix", "org.apache.felix.webconsole").versionAsInProject(), mavenBundle("org.apache.felix", "org.apache.felix.inventory").versionAsInProject(), mavenBundle("org.apache.felix", "org.apache.felix.metatype").versionAsInProject(), mavenBundle("org.apache.felix", "org.apache.felix.scr").versionAsInProject(), mavenBundle("commons-io", "commons-io").versionAsInProject(), wrappedBundle(mavenBundle("commons-fileupload", "commons-fileupload").versionAsInProject()), LogTestBase.configAdmin(), addPaxExamSpecificOptions(), addCodeCoverageOption(), addDebugOptions(), addExtraOptions(), addDefaultOptions());
}
use of org.ops4j.pax.exam.Configuration in project sling by apache.
the class DataSourceTestBase method config.
@Configuration
public Option[] config() throws IOException {
final String bundleFileName = System.getProperty(BUNDLE_JAR_SYS_PROP, BUNDLE_JAR_DEFAULT);
final File bundleFile = new File(bundleFileName);
if (!bundleFile.canRead()) {
throw new IllegalArgumentException("Cannot read from bundle file " + bundleFileName + " specified in the " + BUNDLE_JAR_SYS_PROP + " system property. Try building the project first " + "with 'mvn clean install -Pide -DskipTests'");
}
return options(// the current project (the bundle under test)
CoreOptions.bundle(bundleFile.toURI().toString()), mavenBundle("com.h2database", "h2").versionAsInProject(), wrappedBundle(mavenBundle("commons-beanutils", "commons-beanutils-core").versionAsInProject()), mavenBundle("org.slf4j", "slf4j-simple").versionAsInProject().noStart(), mavenBundle("org.apache.felix", "org.apache.felix.scr").versionAsInProject(), mavenBundle("org.apache.felix", "org.apache.felix.configadmin").versionAsInProject(), junitBundles(), systemProperty("pax.exam.osgi.unresolved.fail").value("fail"), systemPackage("com.sun.tools.attach"), cleanCaches(), addCodeCoverageOption(), addDebugOptions());
}
use of org.ops4j.pax.exam.Configuration in project sling by apache.
the class ServerConfiguration method config.
@Configuration
public Option[] config() {
final String bundleFileName = System.getProperty(BUNDLE_JAR_SYS_PROP, BUNDLE_JAR_DEFAULT);
final File bundleFile = new File(bundleFileName);
if (!bundleFile.canRead()) {
throw new IllegalArgumentException("Cannot read from bundle file " + bundleFileName + " specified in the " + BUNDLE_JAR_SYS_PROP + " system property");
}
Option[] base = options(// the current project (the bundle under test)
CoreOptions.bundle(bundleFile.toURI().toString()), mavenBundle("org.ops4j.pax.logging", "pax-logging-api", "1.7.0").startLevel(2), mavenBundle("org.ops4j.pax.logging", "pax-logging-service", "1.7.0").startLevel(2), mavenBundle("org.apache.felix", "org.apache.felix.configadmin").versionAsInProject(), mavenBundle("org.apache.felix", "org.apache.felix.http.jetty").versionAsInProject().startLevel(3), mavenBundle("org.apache.felix", "org.apache.felix.http.whiteboard").versionAsInProject().startLevel(5), mavenBundle("org.apache.felix", "org.apache.felix.scr").versionAsInProject(), mavenBundle("org.apache.sling", "org.apache.sling.commons.johnzon").versionAsInProject(), systemProperty("pax.exam.osgi.unresolved.fail").value("fail"), systemProperty("org.osgi.service.http.port").value(getServerPort()), cleanCaches(), createTestBundle(), addCodeCoverageOption());
final Option vmOption = (paxRunnerVmOption != null) ? CoreOptions.vmOption(paxRunnerVmOption) : null;
return OptionUtils.combine(base, vmOption);
}
use of org.ops4j.pax.exam.Configuration in project sling by apache.
the class LogTestBase method config.
@Configuration
public Option[] config() throws IOException {
final String bundleFileName = System.getProperty(BUNDLE_JAR_SYS_PROP, BUNDLE_JAR_DEFAULT);
final File bundleFile = new File(bundleFileName);
if (!bundleFile.canRead()) {
throw new IllegalArgumentException("Cannot read from bundle file " + bundleFileName + " specified in the " + BUNDLE_JAR_SYS_PROP + " system property. Try building the project first " + "with 'mvn clean install -Pide -DskipTests'");
}
return options(// the current project (the bundle under test)
CoreOptions.bundle(bundleFile.toURI().toString()), mavenBundle("org.slf4j", "slf4j-api").versionAsInProject(), addPaxExamSpecificOptions(), addCodeCoverageOption(), addDebugOptions(), addExtraOptions(), addDefaultOptions());
}
use of org.ops4j.pax.exam.Configuration in project cxf by apache.
the class BasicSTSIntegrationTest method getConfig.
@Configuration
public Option[] getConfig() {
String port = TestUtil.getPortNumber(BasicSTSIntegrationTest.class);
System.setProperty("BasicSTSIntegrationTest.PORT", port);
String karafVersion = System.getProperty("karaf.version", "4.0.8");
String localRepository = System.getProperty("localRepository");
MavenArtifactUrlReference karafUrl = //
maven().groupId(//
"org.apache.karaf").artifactId(//
"apache-karaf").version(karafVersion).type("tar.gz");
MavenArtifactUrlReference stsFeatures = //
maven().groupId(//
"org.apache.cxf.services.sts.systests").artifactId(//
"cxf-services-sts-systests-features").versionAsInProject().type("xml");
return new Option[] { karafDistributionConfiguration().frameworkUrl(karafUrl).karafVersion(karafVersion).unpackDirectory(new File("target/paxexam/unpack/")).useDeployFolder(false), systemProperty("java.awt.headless").value("true"), systemProperty("BasicSTSIntegrationTest.PORT").value(port), copy("clientKeystore.properties"), copy("clientstore.jks"), copy("etc/org.ops4j.pax.logging.cfg"), editConfigurationFilePut("etc/org.ops4j.pax.web.cfg", "org.osgi.service.http.port", port), when(localRepository != null).useOptions(editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg", "org.ops4j.pax.url.mvn.localRepository", localRepository)), features(stsFeatures, "cxf-sts-service"), configureConsole().ignoreLocalConsole().ignoreRemoteShell() };
}
Aggregations