org.ops4j.pax.exam.CoreOptions Java Examples

The following examples show how to use org.ops4j.pax.exam.CoreOptions. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ServiceMixDistroTest.java    From servicemix with Apache License 2.0 6 votes vote down vote up
public Option baseConfig() {
    examples = maven().groupId("org.apache.servicemix.features").artifactId("servicemix-examples").type("xml").classifier("features").versionAsInProject();
    karafUrl = maven().groupId("org.apache.servicemix").artifactId("apache-servicemix").type("zip").versionAsInProject();
    String LOCAL_REPOSITORY = System.getProperty("org.ops4j.pax.url.mvn.localRepository");
    return CoreOptions.composite(
        // KarafDistributionOption.debugConfiguration("8889", true),
        karafDistributionConfiguration().frameworkUrl(karafUrl)
            .name("Apache Servicemix")
            .unpackDirectory(new File("target/exam"))
            .useDeployFolder(false),
        systemProperty("pax.exam.osgi.unresolved.fail").value("true"),
        configureSecurity().disableKarafMBeanServerBuilder(),
        keepRuntimeFolder(),
        logLevel(LogLevel.INFO),
        editConfigurationFilePut("etc/custom.properties", "karaf.delay.console", "false"),
        editConfigurationFilePut("etc/org.ops4j.pax.logging.cfg", "log4j.logger.org.apache.karaf.features", "WARN"),
        editConfigurationFilePut("etc/org.ops4j.pax.logging.cfg", "log4j.logger.org.apache.aries.spifly", "WARN"),
        KarafDistributionOption.features(examples, "transaction"),
        when(null != LOCAL_REPOSITORY && LOCAL_REPOSITORY.length() > 0)
        .useOptions(editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg", "org.ops4j.pax.url.mvn.localRepository", LOCAL_REPOSITORY))
        
    );
}
 
Example #2
Source File: JSONRPCImporterTest.java    From fuchsia with Apache License 2.0 6 votes vote down vote up
public Option getBundles() {
    return CoreOptions.composite(
            // CoreOptions.vmOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
            mavenBundle().groupId("org.ow2.chameleon.fuchsia.base.json-rpc")
                    .artifactId("org.ow2.chameleon.fuchsia.base.json-rpc.json-rpc-bundle").versionAsInProject(),
            mavenBundle().groupId("com.fasterxml.jackson.core").artifactId("jackson-core").versionAsInProject(),
            mavenBundle().groupId("commons-io").artifactId("commons-io").versionAsInProject(),
            mavenBundle().groupId("com.fasterxml.jackson.core").artifactId("jackson-databind").versionAsInProject(),
            mavenBundle().groupId("com.fasterxml.jackson.core").artifactId("jackson-annotations").versionAsInProject(),
            mavenBundle().groupId("org.apache.httpcomponents").artifactId("httpcore-osgi").versionAsInProject(),
            mavenBundle().groupId("org.apache.httpcomponents").artifactId("httpclient-osgi").versionAsInProject(),
            wrappedBundle(mavenBundle("org.apache.httpcomponents", "httpcore-nio").versionAsInProject()),
            mavenBundle().groupId("org.ow2.chameleon.fuchsia.importer").artifactId("org.ow2.chameleon.fuchsia.importer.json-rpc").versionAsInProject(),
            mavenBundle().groupId("org.ow2.chameleon.fuchsia.tools").artifactId("fuchsia-proxies-utils").versionAsInProject(),
            mavenBundle().groupId("javax.portlet").artifactId("portlet-api").versionAsInProject(),
            mavenBundle().groupId("javax.servlet").artifactId("javax.servlet-api").versionAsInProject(),
            mavenBundle().groupId("commons-logging").artifactId("commons-logging").versionAsInProject(),
            systemPackages("com.sun.net.httpserver", "sun.misc", "com.sun.net.httpserver.spi")
    );
}
 
Example #3
Source File: OSGiTestBase.java    From Chronicle-Queue with Apache License 2.0 6 votes vote down vote up
/**
 * @param projectName
 * @return
 */
public static Option workspaceBundle(String projectName) {
    String baseDir = System.getProperty("main.basedir");
    String bundleDir = null;

    bundleDir = String.format("%s/%s/target/classes", baseDir, projectName);
    if (new File(bundleDir).exists()) {
        return CoreOptions.bundle(String.format("reference:file:%s", bundleDir));
    }

    bundleDir = String.format("%s/../%s/target/classes", baseDir, projectName);
    if (new File(bundleDir).exists()) {
        return CoreOptions.bundle(String.format("reference:file:%s", bundleDir));
    }

    return null;
}
 
Example #4
Source File: OSGiTestBase.java    From Java-Thread-Affinity with Apache License 2.0 6 votes vote down vote up
public static Option workspaceBundle(String projectName) {
    String baseDir = System.getProperty("main.basedir");
    String bundleDir = null;

    bundleDir = String.format("%s/%s/target/classes", baseDir, projectName);
    if (new File(bundleDir).exists()) {
        return CoreOptions.bundle(String.format("reference:file:%s", bundleDir));
    }

    bundleDir = String.format("%s/../%s/target/classes", baseDir, projectName);
    if (new File(bundleDir).exists()) {
        return CoreOptions.bundle(String.format("reference:file:%s", bundleDir));
    }

    return null;
}
 
Example #5
Source File: IgniteOsgiServiceTest.java    From ignite with Apache License 2.0 6 votes vote down vote up
/**
 * @return Config.
 */
@Configuration
public Option[] bundleDelegatingConfig() {
    List<Option> options = new ArrayList<>(Arrays.asList(baseConfig()));

    // Add bundles we require.
    options.add(
        streamBundle(bundle()
            .add(BasicIgniteTestActivator.class)
            .add(TestOsgiFlags.class)
            .add(TestOsgiFlagsImpl.class)
            .set(Constants.BUNDLE_SYMBOLICNAME, BasicIgniteTestActivator.class.getSimpleName())
            .set(Constants.BUNDLE_ACTIVATOR, BasicIgniteTestActivator.class.getName())
            .set(Constants.EXPORT_PACKAGE, "org.apache.ignite.osgi.activators")
            .set(Constants.DYNAMICIMPORT_PACKAGE, "*")
            .build(withBnd())));

    // Uncomment this if you'd like to debug inside the container.
    // options.add(KarafDistributionOption.debugConfiguration());

    return CoreOptions.options(options.toArray(new Option[0]));
}
 
Example #6
Source File: IgniteKarafFeaturesInstallationTest.java    From ignite with Apache License 2.0 5 votes vote down vote up
/**
 * Container configuration.
 *
 * @return The configuration.
 */
@Configuration
public Option[] config() {
    List<Option> options = new ArrayList<>(Arrays.asList(baseConfig()));

    options.add(KarafDistributionOption.features(CAMEL_REPO_URI));

    return CoreOptions.options(options.toArray(new Option[0]));
}
 
Example #7
Source File: ValidatorCRLTest.java    From cxf with Apache License 2.0 5 votes vote down vote up
@Configuration
public Option[] getConfig() {
    return new Option[] {
        CoreOptions.composite(super.getConfig()),
        copy("data/xkms/certificates/crls/wss40CACRL.cer"),
        editConfigurationFilePut("etc/org.apache.cxf.xkms.cfg", "xkms.enableRevocation", "true")
    };
}
 
Example #8
Source File: KarafTestSupport.java    From mobi with GNU Affero General Public License v3.0 5 votes vote down vote up
@Configuration
public Option[] config() throws IOException, URISyntaxException {
    MavenArtifactUrlReference karafUrl = CoreOptions.maven()
            .groupId("com.mobi")
            .artifactId("mobi-distribution")
            .version(MavenUtils.getArtifactVersion("com.mobi", "mobi-distribution"))
            .type("tar.gz");

    List<Option> options = new ArrayList<>(Arrays.asList(
            KarafDistributionOption.karafDistributionConfiguration()
                    .frameworkUrl(karafUrl)
                    .unpackDirectory(new File("target/exam"))
                    .useDeployFolder(false),
            KarafDistributionOption.keepRuntimeFolder(),
            KarafDistributionOption.logLevel(LogLevel.INFO),
            KarafDistributionOption.replaceConfigurationFile("etc/org.ops4j.pax.logging.cfg", getFileResource("/etc/org.ops4j.pax.logging.cfg")),
            KarafDistributionOption.editConfigurationFilePut("etc/org.ops4j.pax.web.cfg", "org.osgi.service.http.port", HTTP_PORT),
            KarafDistributionOption.editConfigurationFilePut("etc/org.ops4j.pax.web.cfg", "org.osgi.service.http.port.secure", HTTPS_PORT),
            KarafDistributionOption.editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiRegistryPort", RMI_REG_PORT),
            KarafDistributionOption.editConfigurationFilePut("etc/org.apache.karaf.shell.cfg", "sshPort", SSH_PORT),
            KarafDistributionOption.editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiServerPort", RMI_SERVER_PORT),
            CoreOptions.mavenBundle()
                    .groupId("com.mobi")
                    .artifactId("itests-support")
                    .version(MavenUtils.getArtifactVersion("com.mobi", "itests-support"))
    ));

    Files.list(getFileResource("/etc").toPath()).forEach(path ->
            options.add(KarafDistributionOption.replaceConfigurationFile("etc/" + path.getFileName(), path.toFile())));

    return options.toArray(new Option[options.size()]);
}
 
Example #9
Source File: BlueprintBasicTest.java    From activiti6-boot2 with Apache License 2.0 5 votes vote down vote up
@Configuration
public Option[] createConfiguration() {
  Option[] coreBundles = options(
      mavenBundle().groupId("org.activiti").artifactId("activiti-bpmn-model").version("6.0.0"),
      mavenBundle().groupId("org.activiti").artifactId("activiti-bpmn-converter").version("6.0.0"),
      mavenBundle().groupId("org.activiti").artifactId("activiti-process-validation").version("6.0.0"),
      mavenBundle().groupId("org.activiti").artifactId("activiti-image-generator").version("6.0.0"),
      mavenBundle().groupId("org.activiti").artifactId("activiti-form-model").version("6.0.0"),
      mavenBundle().groupId("org.activiti").artifactId("activiti-form-api").version("6.0.0"),
      mavenBundle().groupId("org.activiti").artifactId("activiti-dmn-model").version("6.0.0"),
      mavenBundle().groupId("org.activiti").artifactId("activiti-dmn-api").version("6.0.0"),
      mavenBundle().groupId("org.activiti").artifactId("activiti-engine").version("6.0.0"),
      mavenBundle().groupId("org.apache.commons").artifactId("commons-lang3").version("3.3.2"),
      mavenBundle().groupId("com.fasterxml.jackson.core").artifactId("jackson-core").version("2.7.5"),
      mavenBundle().groupId("com.fasterxml.jackson.core").artifactId("jackson-databind").version("2.7.5"),
      mavenBundle().groupId("com.fasterxml.jackson.core").artifactId("jackson-annotations").version("2.7.5"),
      mavenBundle().groupId("de.odysseus.juel").artifactId("juel-api").version("2.2.7"),
      mavenBundle().groupId("de.odysseus.juel").artifactId("juel-impl").version("2.2.7"),
      mavenBundle().groupId("de.odysseus.juel").artifactId("juel-spi").version("2.2.7"),
      mavenBundle().groupId("log4j").artifactId("log4j").version("1.2.17"),
      mavenBundle().groupId("joda-time").artifactId("joda-time").version("2.6"),
      mavenBundle().groupId("com.h2database").artifactId("h2").version("1.3.176"),
      mavenBundle().groupId("org.mybatis").artifactId("mybatis").version("3.4.2"),
      mavenBundle().groupId("org.slf4j").artifactId("slf4j-api").version("1.7.6"),
      mavenBundle().groupId("org.slf4j").artifactId("slf4j-log4j12").version("1.7.6").noStart(),
      mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.fileinstall").version("3.5.4"),
      mavenBundle().groupId("org.apache.aries.blueprint").artifactId("org.apache.aries.blueprint.core").version("1.6.2"),
      mavenBundle().groupId("org.apache.aries.proxy").artifactId("org.apache.aries.proxy").version("1.0.1"),
      mavenBundle().groupId("org.apache.aries").artifactId("org.apache.aries.util").version("1.1.1"), 
      mavenBundle().groupId("org.osgi").artifactId("org.osgi.enterprise").version("5.0.0"),
      bundle("reference:file:target/classes"));

  Option[] optionArray = OptionUtils.combine(coreBundles, CoreOptions.junitBundles(),
      provision(createTestBundleWithProcessEngineConfiguration(), createTestBundleWithProcessDefinition(), createTestBundleWithTask()));
  return optionArray;
}
 
Example #10
Source File: KarafIT.java    From fcrepo-camel-toolbox with Apache License 2.0 4 votes vote down vote up
@Configuration
public Option[] config() throws Exception {
    final ConfigurationManager cm = new ConfigurationManager();
    final String artifactName = cm.getProperty("project.artifactId") + "-" + cm.getProperty("project.version");
    final String fcrepoServiceBundle = "file:" + getBaseDir() + "/target/" + artifactName + ".jar";
    final String fcrepoPort = cm.getProperty("fcrepo.dynamic.test.port");
    final String jmsPort = cm.getProperty("fcrepo.dynamic.jms.port");
    final String rmiRegistryPort = cm.getProperty("karaf.rmiRegistry.port");
    final String rmiServerPort = cm.getProperty("karaf.rmiServer.port");
    final String sshPort = cm.getProperty("karaf.ssh.port");
    return new Option[] {
        karafDistributionConfiguration()
            .frameworkUrl(maven().groupId("org.apache.karaf").artifactId("apache-karaf")
                    .versionAsInProject().type("zip"))
            .unpackDirectory(new File("target", "exam"))
            .useDeployFolder(false),
        logLevel(LogLevel.WARN),
        keepRuntimeFolder(),
        configureConsole().ignoreLocalConsole(),
        features(maven().groupId("org.apache.karaf.features").artifactId("standard")
                    .type("xml").classifier("features").versionAsInProject(), "scr"),
        features(maven().groupId("org.apache.camel.karaf").artifactId("apache-camel")
                    .type("xml").classifier("features").versionAsInProject(), "camel",
                    "camel-blueprint", "camel-jackson"),
        features(maven().groupId("org.fcrepo.camel").artifactId("fcrepo-camel")
                    .type("xml").classifier("features").versionAsInProject(), "fcrepo-camel"),

        CoreOptions.systemProperty("fcrepo.port").value(fcrepoPort),
        CoreOptions.systemProperty("jms.port").value(jmsPort),
        CoreOptions.systemProperty("fcrepo.service.bundle").value(fcrepoServiceBundle),

        editConfigurationFilePut("etc/org.fcrepo.camel.service.cfg", "fcrepo.baseUrl",
                "http://localhost:" + fcrepoPort + "/fcrepo/rest"),
        editConfigurationFilePut("etc/org.fcrepo.camel.service.cfg", "fcrepo.authUsername",
                FEDORA_USERNAME),
        editConfigurationFilePut("etc/org.fcrepo.camel.service.cfg", "fcrepo.authPassword",
                FEDORA_PASSWORD),

        bundle(fcrepoServiceBundle).start(),

        editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiRegistryPort", rmiRegistryPort),
        editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiServerPort", rmiServerPort),
        editConfigurationFilePut("etc/org.apache.karaf.shell.cfg", "sshPort", sshPort)
   };
}
 
Example #11
Source File: KarafIT.java    From fcrepo-camel-toolbox with Apache License 2.0 4 votes vote down vote up
@Configuration
public Option[] config() throws Exception {
    final ConfigurationManager cm = new ConfigurationManager();
    final String artifactName = cm.getProperty("project.artifactId") + "-" + cm.getProperty("project.version");
    final String fcrepoServiceBundle = "file:" + getBaseDir() + "/target/" + artifactName + ".jar";
    final String fcrepoPort = cm.getProperty("fcrepo.dynamic.test.port");
    final String jmsPort = cm.getProperty("fcrepo.dynamic.jms.port");
    final String rmiRegistryPort = cm.getProperty("karaf.rmiRegistry.port");
    final String rmiServerPort = cm.getProperty("karaf.rmiServer.port");
    final String sshPort = cm.getProperty("karaf.ssh.port");
    return new Option[] {
        karafDistributionConfiguration()
            .frameworkUrl(maven().groupId("org.apache.karaf").artifactId("apache-karaf")
                    .versionAsInProject().type("zip"))
                .karafVersion("4.0.6")
            .unpackDirectory(new File("target", "exam"))
            .useDeployFolder(false),
        logLevel(LogLevel.WARN),
        keepRuntimeFolder(),
        configureConsole().ignoreLocalConsole(),
        features(maven().groupId("org.apache.karaf.features").artifactId("standard")
                    .type("xml").classifier("features").versionAsInProject(), "scr"),
        features(maven().groupId("org.apache.camel.karaf").artifactId("apache-camel")
                    .type("xml").classifier("features").versionAsInProject(), "camel",
                    "camel-blueprint", "camel-http4", "camel-jms"),
        features(maven().groupId("org.apache.activemq").artifactId("activemq-karaf")
                    .type("xml").classifier("features").versionAsInProject(), "activemq-camel"),
        features(maven().groupId("org.fcrepo.camel").artifactId("fcrepo-camel")
                    .type("xml").classifier("features").versionAsInProject(), "fcrepo-camel"),

        CoreOptions.systemProperty("fcrepo.port").value(fcrepoPort),
        CoreOptions.systemProperty("jms.port").value(jmsPort),
        CoreOptions.systemProperty("fcrepo.service.activemq.bundle").value(fcrepoServiceBundle),

        editConfigurationFilePut("etc/org.ops4j.pax.logging.cfg",
                "log4j.logger.org.apache.camel.impl.converter", "ERROR, stdout"),

        bundle(fcrepoServiceBundle).start(),
        streamBundle(
                TinyBundles.bundle().add("OSGI-INF/blueprint/blueprint-test.xml",
                        new File("src/test/resources/OSGI-INF/blueprint/blueprint-test.xml").toURI().toURL())
                .set(Constants.BUNDLE_SYMBOLICNAME, "org.fcrepo.camel.service.activemq.test")
                .set(Constants.BUNDLE_MANIFESTVERSION, "2")
                .set(Constants.DYNAMICIMPORT_PACKAGE, "*")
                .build()
            ).start(),

        editConfigurationFilePut("etc/org.fcrepo.camel.service.activemq.cfg", "jms.consumers", "1"),
        editConfigurationFilePut("etc/org.fcrepo.camel.service.activemq.cfg", "jms.connections", "1"),
        editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiRegistryPort", rmiRegistryPort),
        editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiServerPort", rmiServerPort),
        editConfigurationFilePut("etc/org.apache.karaf.shell.cfg", "sshPort", sshPort),
        editConfigurationFilePut("etc/org.fcrepo.camel.service.activemq.cfg", "jms.brokerUrl",
                "tcp://localhost:" + jmsPort)
   };
}
 
Example #12
Source File: KarafIT.java    From fcrepo-camel-toolbox with Apache License 2.0 4 votes vote down vote up
@Configuration
public Option[] config() {
    final ConfigurationManager cm = new ConfigurationManager();
    final String fcrepoPort = cm.getProperty("fcrepo.dynamic.test.port");
    final String jmsPort = cm.getProperty("fcrepo.dynamic.jms.port");
    final String reindexingPort = cm.getProperty("fcrepo.dynamic.reindexing.port");
    final String rmiRegistryPort = cm.getProperty("karaf.rmiRegistry.port");
    final String rmiServerPort = cm.getProperty("karaf.rmiServer.port");
    final String sshPort = cm.getProperty("karaf.ssh.port");
    final String fcrepoBaseUrl = "localhost:" + fcrepoPort + "/fcrepo/rest";

    final String version = cm.getProperty("project.version");
    final String fcrepoAudit = getBundleUri("fcrepo-audit-triplestore", version);
    final String fcrepoFixity = getBundleUri("fcrepo-fixity", version);
    final String fcrepoReindexing = getBundleUri("fcrepo-reindexing", version);
    final String fcrepoSerialization = getBundleUri("fcrepo-serialization", version);
    final String fcrepoIndexingSolr = getBundleUri("fcrepo-indexing-solr", version);
    final String fcrepoIndexingTriplestore = getBundleUri("fcrepo-indexing-triplestore", version);
    final String fcrepoServiceAmq = getBundleUri("fcrepo-service-activemq", version);
    final String fcrepoService = getBundleUri("fcrepo-service-camel", version);

    final String fcrepoReindexingBlueprint = getBlueprintUri("fcrepo-reindexing-blueprint", version);

    return new Option[] {
        karafDistributionConfiguration()
            .frameworkUrl(maven().groupId("org.apache.karaf").artifactId("apache-karaf")
                    .versionAsInProject().type("zip"))
            .unpackDirectory(new File("target", "exam"))
            .useDeployFolder(false),
        logLevel(LogLevel.WARN),
        keepRuntimeFolder(),
        configureConsole().ignoreLocalConsole(),
        features(maven().groupId("org.apache.karaf.features").artifactId("standard")
                    .versionAsInProject().classifier("features").type("xml"), "scr"),
        features(maven().groupId("org.apache.camel.karaf").artifactId("apache-camel")
                    .type("xml").classifier("features").versionAsInProject(), "camel-mustache",
                    "camel-blueprint", "camel-http4", "camel-spring", "camel-exec", "camel-jetty9",
                    "camel-jacksonxml"),
        features(maven().groupId("org.apache.activemq").artifactId("activemq-karaf")
                    .type("xml").classifier("features").versionAsInProject(), "activemq-camel"),
        features(maven().groupId("org.fcrepo.camel").artifactId("fcrepo-camel")
                    .type("xml").classifier("features").versionAsInProject(), "fcrepo-camel"),
        mavenBundle().groupId("org.codehaus.woodstox").artifactId("woodstox-core-asl").versionAsInProject(),

        CoreOptions.systemProperty("o.f.c.serialization-bundle").value(fcrepoSerialization),
        CoreOptions.systemProperty("o.f.c.fixity-bundle").value(fcrepoFixity),
        CoreOptions.systemProperty("o.f.c.reindexing-bundle").value(fcrepoReindexing),
        CoreOptions.systemProperty("o.f.c.a.triplestore-bundle").value(fcrepoAudit),
        CoreOptions.systemProperty("o.f.c.i.triplestore-bundle").value(fcrepoIndexingTriplestore),
        CoreOptions.systemProperty("o.f.c.i.solr-bundle").value(fcrepoIndexingSolr),
        CoreOptions.systemProperty("o.f.c.s.activemq-bundle").value(fcrepoServiceAmq),
        CoreOptions.systemProperty("o.f.c.s.camel-bundle").value(fcrepoService),

        bundle(fcrepoAudit).start(),
        bundle(fcrepoIndexingSolr).start(),
        bundle(fcrepoIndexingTriplestore).start(),
        bundle(fcrepoFixity).start(),
        bundle(fcrepoSerialization).start(),
        bundle(fcrepoReindexing).start(),
        bundle(fcrepoServiceAmq).start(),
        bundle(fcrepoService).start(),
        bundle(fcrepoReindexingBlueprint).start(),

        CoreOptions.systemProperty("fcrepo.port").value(fcrepoPort),
        CoreOptions.systemProperty("karaf.reindexing.port").value(reindexingPort),
        editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiRegistryPort", rmiRegistryPort),
        editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiServerPort", rmiServerPort),
        editConfigurationFilePut("etc/org.apache.karaf.shell.cfg", "sshPort", sshPort),
        editConfigurationFilePut("etc/org.fcrepo.camel.serialization.cfg", "serialization.descriptions",
                "data/tmp/descriptions"),
        editConfigurationFilePut("etc/org.fcrepo.camel.reindexing.cfg", "rest.port", reindexingPort),
        editConfigurationFilePut("etc/org.fcrepo.camel.service.cfg", "fcrepo.baseUrl", fcrepoBaseUrl),
        editConfigurationFilePut("etc/org.fcrepo.camel.service.activemq.cfg", "jms.brokerUrl",
                "tcp://localhost:" + jmsPort),
        editConfigurationFilePut("etc/org.ops4j.pax.logging.cfg",
                "log4j.logger.org.apache.camel.impl.converter", "ERROR, stdout")
   };
}
 
Example #13
Source File: BaseITest.java    From osgi-best-practices with Apache License 2.0 4 votes vote down vote up
private Option awaitility() {
    return CoreOptions.composite( //
            mvn("org.awaitility", "awaitility"),
            mvn("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.hamcrest"));
}
 
Example #14
Source File: ScriptEngineBundleTrackerCustomizerIntegrationTest.java    From camunda-bpm-platform-osgi with Apache License 2.0 4 votes vote down vote up
@Configuration
@Override
public Option[] createConfiguration() {
  return OptionUtils.combine(super.createConfiguration(), CoreOptions.provision(createTestBundle()));
}
 
Example #15
Source File: OSGiTestEnvironment.java    From camunda-bpm-platform-osgi with Apache License 2.0 4 votes vote down vote up
@Override
public Option[] createConfiguration() {
  Option[] camundaBundles = options(

    // camunda core
    mavenBundle("org.camunda.bpm", "camunda-engine").versionAsInProject(),
    mavenBundle("org.camunda.bpm.dmn", "camunda-engine-feel-api").versionAsInProject(),
    mavenBundle("org.camunda.bpm.dmn", "camunda-engine-feel-juel").versionAsInProject(),
    mavenBundle("org.camunda.bpm.dmn", "camunda-engine-dmn").versionAsInProject(),
    mavenBundle("org.camunda.bpm.model", "camunda-bpmn-model").versionAsInProject(),
    mavenBundle("org.camunda.bpm.model", "camunda-cmmn-model").versionAsInProject(),
    mavenBundle("org.camunda.bpm.model", "camunda-xml-model").versionAsInProject(),
    mavenBundle("org.camunda.bpm.model", "camunda-dmn-model").versionAsInProject(),
    mavenBundle("org.camunda.commons", "camunda-commons-typed-values").versionAsInProject(),
    mavenBundle("org.camunda.commons", "camunda-commons-logging").versionAsInProject(),
    mavenBundle("org.camunda.commons", "camunda-commons-utils").versionAsInProject(),
    // camunda core dependencies
    mavenBundle("joda-time", "joda-time").versionAsInProject(),
    mavenBundle("com.h2database", "h2").versionAsInProject(),
    mavenBundle("org.mybatis", "mybatis").versionAsInProject(),
    mavenBundle("com.fasterxml.uuid", "java-uuid-generator").versionAsInProject(),
    mavenBundle("de.odysseus.juel", "juel-api").versionAsInProject(),
    mavenBundle("de.odysseus.juel", "juel-impl").versionAsInProject(),
    mavenBundle("org.slf4j", "slf4j-api", "1.7.7"),
    mavenBundle("ch.qos.logback", "logback-core", "1.1.2"),
    mavenBundle("ch.qos.logback", "logback-classic", "1.1.2"),
    mavenBundle("com.sun.activation", "javax.activation", "1.2.0"),
    //camunda osgi
    mavenBundle("org.camunda.bpm.extension.osgi", "camunda-bpm-osgi").versionAsInProject(),
    //camunda osgi dependencies
    mavenBundle("org.apache.felix", "org.apache.felix.dependencymanager").versionAsInProject(),

    // make sure compiled classes from src/main are included
    bundle("reference:file:target/classes"));
  return OptionUtils.combine(
    camundaBundles,
    CoreOptions.junitBundles(),
    //for the logging
    systemProperty("logback.configurationFile")
    .value("file:" + PathUtils.getBaseDir() + "/src/test/resources/logback-test.xml")
  );
}
 
Example #16
Source File: BlueprintBasicTest.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
@Configuration
public Option[] createConfiguration() {
    Option[] coreBundles = options(
            mavenBundle().groupId("org.flowable").artifactId("flowable-bpmn-model").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-engine-common-api").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-engine-common").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-bpmn-converter").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-process-validation").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-image-generator").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-form-model").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-form-api").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-dmn-model").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-dmn-api").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-idm-api").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-idm-engine").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-idm-engine-configurator").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-event-registry-model").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-event-registry-api").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-event-registry-json-converter").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-event-registry").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-event-registry-configurator").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-content-api").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-variable-service-api").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-variable-service").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-identitylink-service-api").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-identitylink-service").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-entitylink-service-api").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-entitylink-service").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-eventsubscription-service-api").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-eventsubscription-service").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-task-service-api").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-task-service").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-job-service-api").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-job-service").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-batch-service").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-batch-service-api").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-cmmn-model").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-cmmn-api").versionAsInProject(),
            mavenBundle().groupId("org.flowable").artifactId("flowable-engine").versionAsInProject(),
            mavenBundle().groupId("org.apache.commons").artifactId("commons-lang3").versionAsInProject(),
            mavenBundle().groupId("commons-io").artifactId("commons-io").versionAsInProject(),
            mavenBundle().groupId("com.fasterxml.uuid").artifactId("java-uuid-generator").versionAsInProject(),
            mavenBundle().groupId("com.fasterxml.jackson.core").artifactId("jackson-core").versionAsInProject(),
            mavenBundle().groupId("com.fasterxml.jackson.core").artifactId("jackson-databind").versionAsInProject(),
            mavenBundle().groupId("com.fasterxml.jackson.core").artifactId("jackson-annotations").versionAsInProject(),
            mavenBundle().groupId("joda-time").artifactId("joda-time").versionAsInProject(),
            mavenBundle().groupId("com.h2database").artifactId("h2").versionAsInProject(),
            mavenBundle().groupId("org.mybatis").artifactId("mybatis").versionAsInProject(),
            mavenBundle().groupId("org.liquibase").artifactId("liquibase-core").versionAsInProject(),
            mavenBundle().groupId("org.yaml").artifactId("snakeyaml").versionAsInProject(),
            mavenBundle().groupId("org.slf4j").artifactId("slf4j-log4j12").versionAsInProject().noStart(),
            mavenBundle().groupId("org.junit.jupiter").artifactId("junit-jupiter-api").versionAsInProject(),
            mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.fileinstall").versionAsInProject(),
            mavenBundle().groupId("org.apache.aries.blueprint").artifactId("org.apache.aries.blueprint.core").versionAsInProject(),
            mavenBundle().groupId("org.apache.aries.proxy").artifactId("org.apache.aries.proxy").versionAsInProject(),
            mavenBundle().groupId("org.apache.aries").artifactId("org.apache.aries.util").versionAsInProject(),
            mavenBundle().groupId("org.osgi").artifactId("org.osgi.enterprise").versionAsInProject(),
            bundle("reference:file:target/classes"));

    Option[] optionArray = OptionUtils.combine(coreBundles, CoreOptions.junitBundles(),
            provision(createTestBundleWithProcessEngineConfiguration(), createTestBundleWithProcessDefinition(), createTestBundleWithTask()));
    return optionArray;
}
 
Example #17
Source File: OSGiTestBase.java    From Java-Thread-Affinity with Apache License 2.0 4 votes vote down vote up
public static MavenArtifactProvisionOption mavenBundleAsInProject(final String groupId, final String artifactId) {
    return CoreOptions.mavenBundle().groupId(groupId).artifactId(artifactId).versionAsInProject();
}
 
Example #18
Source File: OSGiTestBase.java    From Chronicle-Queue with Apache License 2.0 4 votes vote down vote up
public static MavenArtifactProvisionOption mavenBundleAsInProject(final String groupId, final String artifactId) {
    return CoreOptions.mavenBundle().groupId(groupId).artifactId(artifactId).versionAsInProject();
}
 
Example #19
Source File: JSONRPCImporterTest.java    From fuchsia with Apache License 2.0 4 votes vote down vote up
@Override
public Option[] getCustomOptions() {
    return CoreOptions.options(
            getBundles()
    );
}