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


Java Option类代码示例

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


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

示例1: configuration

import org.ops4j.pax.exam.Option; //导入依赖的package包/类
@Configuration
    public Option[] configuration() {
        InputStream testBundle = TinyBundles.bundle()
            .set(Constants.BUNDLE_SYMBOLICNAME, "incompleteTestUnit") //
            .set("Meta-Persistence", " ") //
            .add("META-INF/persistence.xml", this.getClass().getResourceAsStream("/persistence.xml")) //
            .build(TinyBundles.withBnd());
        return new Option[] {//
            baseOptions(),//
            ariesJpa21(),//
            jta12Bundles(), //
            eclipseLink(),//
            derbyDSF(), //
            testBundleEclipseLink().noStart(),//
            streamBundle(testBundle)
//         ,debug()
        };
    }
 
开发者ID:apache,项目名称:aries-jpa,代码行数:19,代码来源:EclipseAdditionalTest.java

示例2: hibernate

import org.ops4j.pax.exam.Option; //导入依赖的package包/类
protected Option hibernate() {
    return composite(
                     mvnBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.antlr"),
                     mvnBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.ant"),
                     mvnBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.dom4j"),
                     mvnBundle("org.apache.servicemix.bundles" , "org.apache.servicemix.bundles.serp"),
                     mvnBundle("com.fasterxml", "classmate"),
                     mvnBundle("org.javassist", "javassist"),
                     mvnBundle("org.jboss.logging", "jboss-logging"),
                     mvnBundle("org.hibernate.common", "hibernate-commons-annotations"), 
                     mvnBundle("org.jboss", "jandex"),
                     mvnBundle("org.hibernate", "hibernate-core"),
                     mvnBundle("org.hibernate", "hibernate-entitymanager"),
                     mvnBundle("org.hibernate", "hibernate-osgi")
        );
}
 
开发者ID:apache,项目名称:aries-jpa,代码行数:17,代码来源:AbstractJPAItest.java

示例3: hibernate5_2

import org.ops4j.pax.exam.Option; //导入依赖的package包/类
protected Option hibernate5_2() {
	return composite(
			systemPackage("javax.xml.stream;version=1.0"), 
			systemPackage("javax.xml.stream.events;version=1.0"),
systemPackage("javax.xml.stream.util;version=1.0"),
			mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.antlr", "2.7.7_5"),
mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.dom4j", "1.6.1_5"),
mavenBundle("com.fasterxml", "classmate", "1.3.0"),
mavenBundle("org.javassist", "javassist", "3.20.0-GA"),
mavenBundle("org.jboss.logging", "jboss-logging", "3.3.0.Final"),
mavenBundle("org.jboss", "jandex", "2.0.3.Final"),
mavenBundle("org.hibernate.common", "hibernate-commons-annotations", "5.0.1.Final"),
mavenBundle("org.hibernate", "hibernate-core", "5.2.10.Final"),
mavenBundle("org.hibernate", "hibernate-osgi", "5.2.10.Final")
			);
}
 
开发者ID:apache,项目名称:aries-jpa,代码行数:17,代码来源:AbstractJPAItest.java

示例4: config

import org.ops4j.pax.exam.Option; //导入依赖的package包/类
@Configuration
public Option[] config() {
    return options(
            // vmOptions("-Xdebug", "-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"),
            systemProperty("org.osc.core.server.installer.debug").value("true"),
            mavenBundle("org.apache.felix", "org.apache.felix.configadmin").versionAsInProject(),
            mavenBundle("org.apache.felix", "org.apache.felix.scr").versionAsInProject(),
            mavenBundle("org.apache.felix", "org.apache.felix.log").versionAsInProject(),
            mavenBundle("org.apache.felix", "org.apache.felix.resolver").versionAsInProject(),
            // NB FileInstall included for its API, but NOT started so the directory polling doesn't happen
            mavenBundle("org.apache.felix", "org.apache.felix.fileinstall").versionAsInProject().start(false),
            mavenBundle("org.osgi", "org.osgi.service.repository").versionAsInProject(),
            mavenBundle("biz.aQute.bnd", "biz.aQute.bndlib").versionAsInProject(),
            mavenBundle("biz.aQute.bnd", "biz.aQute.repository").versionAsInProject(),
            mavenBundle(GROUPID, "osc-resolver").versionAsInProject(),
            mavenBundle(GROUPID, "osc-installer").versionAsInProject(),
            junitBundles(),
            // javax.xml exports required as version=1.0 for bnd repository
            systemPackage("javax.xml.namespace;version=1.0.0"),
            systemPackage("javax.xml.stream;version=1.0.0")
            );
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:23,代码来源:InstallerIntegrationTest.java

示例5: config

import org.ops4j.pax.exam.Option; //导入依赖的package包/类
@Configuration
public Option[] config() throws Exception {
    return options(
            regressionDefaults(),
            mvnBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec"),
            mvnBundle("org.apache.geronimo.specs", "geronimo-j2ee-connector_1.6_spec"),
            mvnBundle("org.apache.geronimo.specs", "geronimo-jms_2.0_spec"),
            mvnBundle("org.ops4j.pax.transx", "pax-transx-tm-api"),
            mvnBundle("org.ops4j.pax.transx", "pax-transx-tm-narayana"),
            mvnBundle("org.ops4j.pax.transx", "pax-transx-connector"),
            mvnBundle("org.ops4j.pax.transx", "pax-transx-jms"),
            mvnBundle("org.ops4j.pax.transx", "pax-transx-jdbc"),
            mvnBundle("com.h2database", "h2"),
            systemProperty("com.arjuna.ats.arjuna.recovery.periodicRecoveryInitilizationOffset").value("1")
    );
}
 
开发者ID:ops4j,项目名称:org.ops4j.pax.transx,代码行数:17,代码来源:NarayanaTest.java

示例6: configuration

import org.ops4j.pax.exam.Option; //导入依赖的package包/类
@Configuration
public static Option[] configuration() throws Exception {
    return new Option[]
            {
                    karafDistributionConfiguration()
                            .frameworkUrl(KARAF_URL)
                            .unpackDirectory(new File("target/paxexam/unpack")),
                    replaceConfigurationFile(BUNDLE_INSTALL_ACL_CFG,
                            new File("src/test/resources/etc/bundleinstall.cfg")),
                    replaceConfigurationFile(CONFIG_PROPERTIES,
                            new File("src/test/resources/etc/config.properties")),
                    mavenBundle()
                            .groupId(OSGIFX_GROUP_ID)
                            .artifactId(OSGIFX_BOOT_ARTIFACT_ID)
                            .versionAsInProject(),
                    mavenBundle()
                            .groupId(OSGIFX_GROUP_ID)
                            .artifactId(IT_DUMMY_BUNDLE_ARTIFACT_ID)
                            .versionAsInProject(),
                    mavenBundle(TESTFX_GROUP_ID, TESTFX_CORE_ARTIFACT_ID, TESTFX_VERSION),
                    mavenBundle(TESTFX_GROUP_ID, TESTFX_INTERNAL_ARTIFACT_ID, TESTFX_VERSION),
                    logLevel(LogLevelOption.LogLevel.INFO)
            };
}
 
开发者ID:jtkb,项目名称:flexfx,代码行数:25,代码来源:TFxTest.java

示例7: configuration

import org.ops4j.pax.exam.Option; //导入依赖的package包/类
@Configuration
public static Option[] configuration() throws Exception {
    return new Option[]
            {
                    karafDistributionConfiguration()
                            .frameworkUrl(KARAF_URL)
                            .unpackDirectory(new File("target/paxexam/unpack")),
                    replaceConfigurationFile(BUNDLE_INSTALL_ACL_CFG,
                            new File("src/test/resources/etc/bundleinstall.cfg")),
                    mavenBundle()
                            .groupId(OSGIFX_GROUP_ID)
                            .artifactId(OSGIFX_BOOT_ARTIFACT_ID)
                            .versionAsInProject(),
                    logLevel(LogLevelOption.LogLevel.INFO)
            };
}
 
开发者ID:jtkb,项目名称:flexfx,代码行数:17,代码来源:DeployOsgiFxTest.java

示例8: configuration

import org.ops4j.pax.exam.Option; //导入依赖的package包/类
@Configuration
public static Option[] configuration() throws Exception
{
    return new Option[]
            {
                    karafDistributionConfiguration()
                            .frameworkUrl(KARAF_URL)
                            .unpackDirectory(new File("target/paxexam/unpack")),
                    replaceConfigurationFile(BUNDLE_INSTALL_ACL_CFG,
                            new File("src/test/resources/etc/bundleinstall.cfg")),
                    replaceConfigurationFile(CONFIG_PROPERTIES,
                            new File("src/test/resources/etc/config.properties")),
                    mavenBundle(TESTFX_GROUP_ID, TESTFX_CORE_ARTIFACT_ID, TESTFX_VERSION),
                    mavenBundle(TESTFX_GROUP_ID, TESTFX_INTERNAL_ARTIFACT_ID, TESTFX_VERSION),
                    logLevel(LogLevelOption.LogLevel.INFO)
            };
}
 
开发者ID:jtkb,项目名称:flexfx,代码行数:18,代码来源:OsgiFxFailureTest.java

示例9: mdSalCoreBundles

import org.ops4j.pax.exam.Option; //导入依赖的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

示例10: configMinumumBundles

import org.ops4j.pax.exam.Option; //导入依赖的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

示例11: configuration

import org.ops4j.pax.exam.Option; //导入依赖的package包/类
@Configuration
public static Option[] configuration() throws Exception {
    MavenArtifactUrlReference karaf = maven().groupId("org.apache.karaf").artifactId("apache-karaf")
        .type("zip").version("4.0.7");
    MavenUrlReference brave = maven().groupId("io.zipkin.brave.karaf").artifactId("brave-features").type("xml")
       .classifier("features").version("1.0.0-SNAPSHOT");
    return new Option[] //
    {
     karafDistributionConfiguration().frameworkUrl(karaf).useDeployFolder(false),
     configureConsole().ignoreLocalConsole(), //
     logLevel(LogLevel.INFO), //
     keepRuntimeFolder(), //
     features(brave, "brave-core", "brave-kafka08"),
     // Create an empty config to trigger creation of component 
     newConfiguration("io.zipkin.reporter.urlconnect").asOption(),
     newConfiguration("io.zipkin.reporter.kafka08").asOption()
    };
}
 
开发者ID:openzipkin,项目名称:brave-karaf,代码行数:19,代码来源:BraveTest.java

示例12: configuration

import org.ops4j.pax.exam.Option; //导入依赖的package包/类
@Configuration
// @formatter:off
public static Option[] configuration() throws Exception {
    return new Option[] {
            karafDistributionConfiguration()
                    .frameworkUrl(
                            maven()
                                .groupId("de.nierbeck.example.vertx")
                                .artifactId("Vertx-Karaf")
                                .type("tar.gz").versionAsInProject()
                            )
                    .unpackDirectory(new File("target/paxexam/unpack/"))
                    .useDeployFolder(false)
                    .runEmbedded(false), // only for debugging
            configureConsole().ignoreLocalConsole(), 
            logLevel(LogLevel.DEBUG), 
            keepRuntimeFolder()
   };
}
 
开发者ID:ANierbeck,项目名称:Karaf-Vertx,代码行数:20,代码来源:VertxExtenderKarafTest.java

示例13: configuration

import org.ops4j.pax.exam.Option; //导入依赖的package包/类
@Configuration
public static Option[] configuration() throws Exception {
    return new Option[] { karafDistributionConfiguration()
            .frameworkUrl(
                        maven()
                            .groupId("de.nierbeck.example.vertx")
                            .artifactId("Vertx-Karaf")
                            .type("tar.gz")
                            .versionAsInProject())
            .unpackDirectory(new File("target/paxexam/unpack/"))
            .useDeployFolder(false)
            .runEmbedded(false), //only for debugging 
            configureConsole().ignoreLocalConsole(), 
            logLevel(LogLevel.INFO), keepRuntimeFolder()
        };
}
 
开发者ID:ANierbeck,项目名称:Karaf-Vertx,代码行数:17,代码来源:CustomVertxKarafTest.java

示例14: configuration

import org.ops4j.pax.exam.Option; //导入依赖的package包/类
@Configuration
public Option[] configuration() throws Exception {
    return new Option[] { karafDistributionConfiguration()
            .frameworkUrl(
                        maven()
                            .groupId("de.nierbeck.example.vertx.mircoservices")
                            .artifactId("Vertx-Microservices-Karaf")
                            .type("tar.gz")
                            .versionAsInProject())
            .unpackDirectory(new File("target/paxexam/unpack/"))
            .useDeployFolder(false)
            .runEmbedded(false) //only for debugging
            , features(
                    maven().groupId("de.nierbeck.example.vertx.mircoservices")
                        .artifactId("Vertx-Microservices-Features")
                        .type("xml")
                        .classifier("features").versionAsInProject(),
                    "Vertx-AliveCheck")
            , configureConsole().ignoreLocalConsole(), logLevel(LogLevel.INFO), keepRuntimeFolder()
            ,  mavenBundle().groupId("io.vertx").artifactId("vertx-unit").versionAsInProject()
        };
}
 
开发者ID:ANierbeck,项目名称:Karaf-Vertx,代码行数:23,代码来源:AliveCheckInternalTest.java

示例15: uninstallNewFeatures

import org.ops4j.pax.exam.Option; //导入依赖的package包/类
/**
 * The feature service does not uninstall feature dependencies when uninstalling a single feature.
 * So we need to make sure we uninstall all features that were newly installed.
 *
 * @param featuresBefore
 * @throws Exception
 */
protected void uninstallNewFeatures(Set<Feature> featuresBefore)
        throws Exception {
    Feature[] features = featureService.listInstalledFeatures();
    for (Feature curFeature : features) {
        if (!featuresBefore.contains(curFeature)) {
            try {
                System.out.println("Uninstalling " + curFeature.getName());
                featureService.uninstallFeature(curFeature.getName(), curFeature.getVersion(),
                        EnumSet.of(FeaturesService.Option.NoAutoRefreshBundles));
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}
 
开发者ID:Jahia,项目名称:jahia-loganalyzer,代码行数:23,代码来源:BaseTest.java


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