当前位置: 首页>>代码示例>>Java>>正文


Java DefaultCompositeOption类代码示例

本文整理汇总了Java中org.ops4j.pax.exam.options.DefaultCompositeOption的典型用法代码示例。如果您正苦于以下问题:Java DefaultCompositeOption类的具体用法?Java DefaultCompositeOption怎么用?Java DefaultCompositeOption使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DefaultCompositeOption类属于org.ops4j.pax.exam.options包,在下文中一共展示了DefaultCompositeOption类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: mdSalCoreBundles

import org.ops4j.pax.exam.options.DefaultCompositeOption; //导入依赖的package包/类
public static Option mdSalCoreBundles() {
    return new DefaultCompositeOption( //
            mavenBundle(YANGTOOLS, "concepts").versionAsInProject(), // //
            mavenBundle(YANGTOOLS, "util").versionAsInProject(), // //
            mavenBundle(MDSAL, "yang-binding").versionAsInProject(), // //
            mavenBundle(YANGTOOLS, "yang-common").versionAsInProject(), // //
            mavenBundle(YANGTOOLS, "object-cache-api").versionAsInProject(), // //
            mavenBundle(YANGTOOLS, "object-cache-guava").versionAsInProject(), // //
            mavenBundle(YANGTOOLS, "triemap").versionAsInProject(), // //
            mavenBundle(CONTROLLER, "sal-common-api").versionAsInProject(), // //
            mavenBundle(CONTROLLER, "sal-common-impl").versionAsInProject(), // //

            mavenBundle("org.apache.commons", "commons-lang3").versionAsInProject(), //
            mavenBundle("com.google.guava", "guava").versionAsInProject(),
            mavenBundle("com.github.romix", "java-concurrent-hash-trie-map").versionAsInProject()
    );
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:18,代码来源:TestHelper.java

示例2: configMinumumBundles

import org.ops4j.pax.exam.options.DefaultCompositeOption; //导入依赖的package包/类
public static Option configMinumumBundles() {
    return new DefaultCompositeOption(
            mavenBundle(CONTROLLER, "config-api").versionAsInProject(), // //
            bindingAwareSalBundles(),
            mavenBundle("commons-codec", "commons-codec").versionAsInProject(),

            systemPackages("sun.nio.ch", "sun.misc"),

            mavenBundle(CONTROLLER, "config-manager").versionAsInProject(), // //
            mavenBundle(CONTROLLER, "config-util").versionAsInProject(), // //
            mavenBundle("commons-io", "commons-io").versionAsInProject(), //
            mavenBundle(CONTROLLER, "config-manager-facade-xml").versionAsInProject(), //
            mavenBundle(CONTROLLER, "yang-jmx-generator").versionAsInProject(), //
            mavenBundle(CONTROLLER, "config-persister-api").versionAsInProject(), //

            mavenBundle(CONTROLLER, "config-persister-impl").versionAsInProject(), //

            mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.xerces", "2.11.0_1"),
            mavenBundle("org.eclipse.birt.runtime.3_7_1", "org.apache.xml.resolver", "1.2.0"),

            mavenBundle(CONTROLLER, "config-persister-file-xml-adapter").versionAsInProject().noStart(),
            mavenBundle("org.eclipse.persistence", "org.eclipse.persistence.moxy").versionAsInProject(),
            mavenBundle("org.eclipse.persistence", "org.eclipse.persistence.core").versionAsInProject());

}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:26,代码来源:TestHelper.java

示例3: getKarafDistributionOption

import org.ops4j.pax.exam.options.DefaultCompositeOption; //导入依赖的package包/类
private static Option getKarafDistributionOption() {
    String karafVersion = getKarafVersion();
    logger.info("*** The karaf version is " + karafVersion + " ***");
    
    KarafDistributionBaseConfigurationOption karafDistributionConfiguration = karafDistributionConfiguration();
    
    /* Use default or custom container */
    if (System.getProperty(PROP_KARAF_DISTRIBUTION_FILE) == null) {
        karafDistributionConfiguration.frameworkUrl(maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("tar.gz").versionAsInProject());
    } else {
        File fuseDistributionFile = new File(System.getProperty(PROP_KARAF_DISTRIBUTION_FILE));
        karafDistributionConfiguration.frameworkUrl("file:" + fuseDistributionFile.getAbsolutePath());
    }
    
    karafDistributionConfiguration.karafVersion(karafVersion)
        .name("Apache Karaf")
        .useDeployFolder(false).unpackDirectory(new File("target/paxexam/unpack/"));
    
    return new DefaultCompositeOption(karafDistributionConfiguration,
            localMavenRepoOption(),
            editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg", "org.ops4j.pax.url.mvn.repositories",
                    "http://repo1.maven.org/[email protected]=central,"
                    + "https://repository.jboss.org/nexus/content/groups/[email protected]=jboss-ea"
                    + "https://repository.jboss.org/nexus/content/groups/[email protected]=jboss-public"
            ));
}
 
开发者ID:jboss-integration,项目名称:fuse-bxms-integ,代码行数:27,代码来源:KarafConfigUtil.java

示例4: getKarafDistributionOption

import org.ops4j.pax.exam.options.DefaultCompositeOption; //导入依赖的package包/类
public static Option getKarafDistributionOption() {
    String karafVersion = getKarafVersion();
    LOG.info("*** The karaf version is " + karafVersion + " ***");
    String localRepo = System.getProperty("maven.repo.local", "");
    if (localRepo.length() > 0) {
        LOG.info("Using alternative local Maven repository in {}.", new File(localRepo).getAbsolutePath());
        localRepo = new File(localRepo).getAbsolutePath().toString()+"@id=local,";
    }
    return new DefaultCompositeOption(KarafDistributionOption.karafDistributionConfiguration()
                                  .frameworkUrl(maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("tar.gz").versionAsInProject())
                                  .karafVersion(karafVersion)
                                  .name("Apache Karaf")
                                  .useDeployFolder(false).unpackDirectory(new File("target/paxexam/unpack/"))
        ,
        KarafDistributionOption.editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg", "org.ops4j.pax.url.mvn.repositories",
                localRepo+
                "http://repo1.maven.org/[email protected]=central," +
                        "    http://svn.apache.org/repos/asf/servicemix/[email protected]=servicemix," +
                        "    http://repository.springsource.com/maven/bundles/[email protected]=springsource.release," +
                        "    http://repository.springsource.com/maven/bundles/[email protected]=springsource.external," +
                        "    https://oss.sonatype.org/content/repositories/releases/@id=sonatype, " +
                        "    https://repository.jboss.org/nexus/content/groups/[email protected]=ea"
        ));

}
 
开发者ID:jboss-integration,项目名称:fuse-bxms-integ,代码行数:26,代码来源:KarafIntegrationTestSupport.java

示例5: useDefaultKarafAsInProjectWithJunitBundles

import org.ops4j.pax.exam.options.DefaultCompositeOption; //导入依赖的package包/类
/**
 * 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));
}
 
开发者ID:apache,项目名称:incubator-provisionr,代码行数:22,代码来源:KarafTests.java

示例6: protocolFrameworkBundles

import org.ops4j.pax.exam.options.DefaultCompositeOption; //导入依赖的package包/类
public static Option protocolFrameworkBundles() {
    return new DefaultCompositeOption(
        mavenBundle("io.netty", "netty-common").versionAsInProject(), //
        mavenBundle("io.netty", "netty-buffer").versionAsInProject(), //
        mavenBundle("io.netty", "netty-handler").versionAsInProject(), //
        mavenBundle("io.netty", "netty-codec").versionAsInProject(), //
        mavenBundle("io.netty", "netty-transport").versionAsInProject(), //
        mavenBundle(CONTROLLER, "netty-config-api").versionAsInProject(), //
        mavenBundle(CONTROLLER, "protocol-framework").versionAsInProject()
    );

}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:13,代码来源:TestHelper.java

示例7: salTestModelBundles

import org.ops4j.pax.exam.options.DefaultCompositeOption; //导入依赖的package包/类
/**
 * @return option containing models for testing purposes
 */
public static Option salTestModelBundles() {
    return new DefaultCompositeOption( //
            mavenBundle(CONTROLLER, "sal-test-model").versionAsInProject()
    );

}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:10,代码来源:TestHelper.java

示例8: baseModelBundles

import org.ops4j.pax.exam.options.DefaultCompositeOption; //导入依赖的package包/类
public static Option baseModelBundles() {
    return new DefaultCompositeOption( //
            mavenBundle(MDSAL+".model", "yang-ext").versionAsInProject(),
            mavenBundle(MDSAL_MODELS, "ietf-type-util").versionAsInProject(),
            mavenBundle(MDSAL_MODELS, "ietf-inet-types").versionAsInProject(),
            mavenBundle(MDSAL_MODELS, "ietf-yang-types").versionAsInProject(),
            mavenBundle(MDSAL_MODELS, "opendaylight-l2-types").versionAsInProject()
            );
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:10,代码来源:TestHelper.java

示例9: junitAndMockitoBundles

import org.ops4j.pax.exam.options.DefaultCompositeOption; //导入依赖的package包/类
public static Option junitAndMockitoBundles() {
    return new DefaultCompositeOption(
    // Repository required to load harmcrest (OSGi-fied version).
    // Mockito
            mavenBundle("org.mockito", "mockito-core", "1.10.19"),
            mavenBundle("org.objenesis", "objenesis", "2.2"),
            junitBundles(),

            /*
             * Felix has implicit boot delegation enabled by default. It
             * conflicts with Mockito: java.lang.LinkageError: loader
             * constraint violation in interface itable initialization: when
             * resolving method
             * "org.osgi.service.useradmin.User$$EnhancerByMockitoWithCGLIB$$dd2f81dc
             * .
             * newInstance(Lorg/mockito/cglib/proxy/Callback;)Ljava/lang/Object
             * ;" the class loader (instance of
             * org/mockito/internal/creation/jmock/SearchingClassLoader) of
             * the current class, org/osgi/service/useradmin/
             * User$$EnhancerByMockitoWithCGLIB$$dd2f81dc, and the class
             * loader (instance of org/apache/felix/framework/
             * BundleWiringImpl$BundleClassLoaderJava5) for interface
             * org/mockito/cglib/proxy/Factory have different Class objects
             * for the type org/mockito/cglib/ proxy/Callback used in the
             * signature
             *
             * So we disable the bootdelegation. this property has no effect
             * on the other OSGi implementation.
             */
            frameworkProperty("felix.bootdelegation.implicit").value("false"));
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:32,代码来源:TestHelper.java

示例10: getOptions

import org.ops4j.pax.exam.options.DefaultCompositeOption; //导入依赖的package包/类
public static Option[] getOptions() {
    if (localRepo != null && !"".equals(localRepo) && !new File(localRepo).isAbsolute()) {
        throw new RuntimeException("maven.repo.local system properties must be absolute.");
    }
    return options(mavenBundle("org.apache.felix", "org.apache.felix.scr"), //
            linkBundle("org.slf4j-slf4j-api"), //
            linkBundle("org.slf4j-slf4j-simple").noStart(), //
            linkBundle("com.fasterxml.jackson.core-jackson-annotations"), //
            linkBundle("com.fasterxml.jackson.core-jackson-core"), //
            linkBundle("com.cedarsoftware-json-io"), //
            linkBundle("commons-codec-commons-codec"), //
            linkBundle("com.thoughtworks.paranamer-paranamer"), //
            linkBundle("org.codehaus.jackson-jackson-core-asl"), //
            linkBundle("org.codehaus.jackson-jackson-mapper-asl"), //
            linkBundle("com.google.guava-guava"), //
            linkBundle("org.apache.commons-commons-compress"), //
            linkBundle("org.apache.commons-commons-lang3"), //
            linkBundle("org.apache.avro-avro"), //
            linkBundle("org.eclipse.jetty.orbit-javax.servlet"), //
            linkBundle("org.talend.daikon-daikon-bundle"), //
            linkBundle("org.talend.daikon-daikon-tests").noStart(), //
            linkBundle("org.talend.components-components-api-service-osgi").start(), //
            linkBundle("org.talend.components-components-api-service-osgi-tests").noStart(), //
            linkBundle("org.talend.components-components-api-bundle"), //
            linkBundle("org.talend.components-components-api-tests").noStart(),
            linkBundle("org.apache.servicemix.bundles-org.apache.servicemix.bundles.hamcrest"), //
            linkBundle("org.ops4j.pax.url-pax-url-aether"),
            // this is copied from junitBundles() to remove the default pax-exam hamcrest bundle that does
            // not contains all the nice hamcrest Matchers
            new DefaultCompositeOption(new JUnitBundlesOption(), systemProperty("pax.exam.invoker").value("junit"),
                    bundle("link:classpath:META-INF/links/org.ops4j.pax.exam.invoker.junit.link")),
            cleanCaches() //
            , frameworkProperty("org.osgi.framework.system.packages.extra").value("sun.misc"), //
            when(localRepo.length() > 0).useOptions(systemProperty("org.ops4j.pax.url.mvn.localRepository").value(localRepo))

    // ,vmOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5010"), systemTimeout(0)//
    );

}
 
开发者ID:Talend,项目名称:components,代码行数:40,代码来源:ComponentsPaxExamOptions.java

示例11: config

import org.ops4j.pax.exam.options.DefaultCompositeOption; //导入依赖的package包/类
@Configuration
public Option[] config() {
  return new Option[] {
      new DefaultCompositeOption(fabricDistributionConfiguration()),
      scanFeatures(getFabricFeatureUrl(), "scr", "mq-fabric"),
      mavenBundle("com.github.pires.example", "client").versionAsInProject() };
}
 
开发者ID:pires,项目名称:fabric8-amq-example,代码行数:8,代码来源:AMQClientTest.java

示例12: everestBundles

import org.ops4j.pax.exam.options.DefaultCompositeOption; //导入依赖的package包/类
public CompositeOption everestBundles() {
    return new DefaultCompositeOption(
            mavenBundle("org.ow2.chameleon.everest", "everest-core").versionAsInProject(),
            mavenBundle("org.ow2.chameleon.everest", "everest-ipojo").versionAsInProject(),
            mavenBundle("org.ow2.chameleon.everest", "everest-osgi").versionAsInProject(),
            mavenBundle("org.ow2.chameleon.everest", "everest-system").versionAsInProject()
    );
}
 
开发者ID:ow2-chameleon,项目名称:everest,代码行数:9,代码来源:EverestOsgiTest.java

示例13: passThroughAllSystemPropertiesWithPrefix

import org.ops4j.pax.exam.options.DefaultCompositeOption; //导入依赖的package包/类
/**
 * Make sure all system properties with a given prefix are also available inside the container
 */
public static DefaultCompositeOption passThroughAllSystemPropertiesWithPrefix(String prefix) {
    DefaultCompositeOption options = new DefaultCompositeOption();
    for (String name : System.getProperties().stringPropertyNames()) {
        if (name.startsWith(prefix)) {
            options.add(systemProperty(name).value(System.getProperty(name)));
        }
    }
    return options;
}
 
开发者ID:apache,项目名称:incubator-provisionr,代码行数:13,代码来源:KarafTests.java

示例14: junitAndMockitoBundles

import org.ops4j.pax.exam.options.DefaultCompositeOption; //导入依赖的package包/类
public static Option junitAndMockitoBundles() {
    return new DefaultCompositeOption(
            // Repository required to load harmcrest (OSGi-fied version).
            repository("http://repository.springsource.com/maven/bundles/external").id(
                    "com.springsource.repository.bundles.external"),
            repository("http://repo1.maven.org/maven2").id("central"),

            // Mockito without Hamcrest and Objenesis
            mavenBundle("org.mockito", "mockito-core", "1.9.5"),

            // Hamcrest with a version matching the range expected by Mockito
            mavenBundle("org.hamcrest", "com.springsource.org.hamcrest.core", "1.1.0"),

            // Objenesis with a version matching the range expected by Mockito
            wrappedBundle(mavenBundle("org.objenesis", "objenesis", "1.2"))
                    .exports("*;version=1.2"),

            // The default JUnit bundle also exports Hamcrest, but with an (incorrect) version of
            // 4.9 which does not match the Mockito import.
            CoreOptions.junitBundles(),

            /*
             * Felix has implicit boot delegation enabled by default. It conflicts with Mockito:
             * java.lang.LinkageError: loader constraint violation in interface itable initialization:
             * when resolving method "org.osgi.service.useradmin.User$$EnhancerByMockitoWithCGLIB$$dd2f81dc
             * .newInstance(Lorg/mockito/cglib/proxy/Callback;)Ljava/lang/Object;" the class loader
             * (instance of org/mockito/internal/creation/jmock/SearchingClassLoader) of the current class,
             * org/osgi/service/useradmin/User$$EnhancerByMockitoWithCGLIB$$dd2f81dc, and the class loader
             * (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoaderJava5) for interface
             * org/mockito/cglib/proxy/Factory have different Class objects for the type org/mockito/cglib/
             * proxy/Callback used in the signature
             *
             * So we disable the bootdelegation.
             */
            frameworkProperty("felix.bootdelegation.implicit").value("false")
    );
}
 
开发者ID:ow2-chameleon,项目名称:osgi-testing-helpers,代码行数:38,代码来源:MockitoOption.java

示例15: packConsole

import org.ops4j.pax.exam.options.DefaultCompositeOption; //导入依赖的package包/类
/**
 * This pack enable the access to the console while debugging in Eclipse (doesnt work in IntelliJ).
 *
 * @return
 */
protected CompositeOption packConsole() {
    CompositeOption logConfig = new DefaultCompositeOption(
            mavenBundle("org.apache.felix",
                    "org.apache.felix.gogo.command").versionAsInProject(),
            mavenBundle("org.apache.felix",
                    "org.apache.felix.gogo.runtime").versionAsInProject(),
            mavenBundle("org.apache.felix",
                    "org.apache.felix.gogo.shell").versionAsInProject(),
            mavenBundle("org.apache.felix",
                    "org.apache.felix.ipojo.arch.gogo").versionAsInProject()
    );

    return logConfig;
}
 
开发者ID:ow2-chameleon,项目名称:fuchsia,代码行数:20,代码来源:RabbitMQTestSuite.java


注:本文中的org.ops4j.pax.exam.options.DefaultCompositeOption类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。