當前位置: 首頁>>代碼示例>>Java>>正文


Java EmptyAsset類代碼示例

本文整理匯總了Java中org.jboss.shrinkwrap.api.asset.EmptyAsset的典型用法代碼示例。如果您正苦於以下問題:Java EmptyAsset類的具體用法?Java EmptyAsset怎麽用?Java EmptyAsset使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


EmptyAsset類屬於org.jboss.shrinkwrap.api.asset包,在下文中一共展示了EmptyAsset類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: deploy

import org.jboss.shrinkwrap.api.asset.EmptyAsset; //導入依賴的package包/類
@Deployment
public static WebArchive deploy() {
    JavaArchive testJar = ShrinkWrap
            .create(JavaArchive.class, "converterTest.jar")
            .addClass(ConverterTest.class)
            .addPackage(CustomDbConfigSource.class.getPackage())
            .addClasses(DuckConverter.class, Duck.class, Donald.class, SomeEnumToConvert.class)
            .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
            .addAsServiceProvider(ConfigSource.class, CustomDbConfigSource.class)
            .addAsServiceProvider(ConfigSourceProvider.class, CustomConfigSourceProvider.class)
            .addAsServiceProvider(Converter.class, DuckConverter.class)
            .as(JavaArchive.class);

    AbstractTest.addFile(testJar, "META-INF/javaconfig.properties");
    AbstractTest.addFile(testJar, "sampleconfig.yaml");

    WebArchive war = ShrinkWrap
            .create(WebArchive.class, "converterTest.war")
            .addAsLibrary(testJar);
    return war;
}
 
開發者ID:eclipse,項目名稱:ConfigJSR,代碼行數:22,代碼來源:ConverterTest.java

示例2: deployAnotherApp

import org.jboss.shrinkwrap.api.asset.EmptyAsset; //導入依賴的package包/類
@Deployment
public static WebArchive deployAnotherApp() {
    JavaArchive testJar = ShrinkWrap
        .create(JavaArchive.class, "ftConfig.jar")
        .addClasses(BeanWithRetry.class)
        .addAsManifestResource(new StringAsset(
                                   "org.eclipse.microprofile.fault.tolerance.tck.config.BeanWithRetry/Retry/maxRetries=5" +
                                       "\norg.eclipse.microprofile.fault.tolerance.tck.config.BeanWithRetry/triggerException/Retry/maxRetries=6"),
                               "microprofile-config.properties")
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

    WebArchive war = ShrinkWrap
        .create(WebArchive.class, "ftConfigTest.war")
        .addAsLibrary(testJar);
    return war;
}
 
開發者ID:eclipse,項目名稱:microprofile-fault-tolerance,代碼行數:18,代碼來源:ConfigPropertyOnClassAndMethodTest.java

示例3: createDeployment

import org.jboss.shrinkwrap.api.asset.EmptyAsset; //導入依賴的package包/類
/**
 * Create a CDI aware base web application archive
 * @return the base base web application archive
 * @throws IOException - on resource failure
 */
@Deployment(testable=true)
public static WebArchive createDeployment() throws IOException {
    URL publicKey = EjbTest.class.getResource("/publicKey.pem");
    WebArchive webArchive = ShrinkWrap
        .create(WebArchive.class, "EjbTest.war")
        .addAsResource(publicKey, "/publicKey.pem")
        .addClass(EjbEndpoint.class)
        .addClass(IService.class)
        .addClass(ServiceEJB.class)
        .addClass(TCKApplication.class)
        .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
        ;
    System.out.printf("WebArchive: %s\n", webArchive.toString(true));
    return webArchive;
}
 
開發者ID:eclipse,項目名稱:microprofile-jwt-auth,代碼行數:21,代碼來源:EjbTest.java

示例4: createDeployment

import org.jboss.shrinkwrap.api.asset.EmptyAsset; //導入依賴的package包/類
/**
 * Deploy the apps to test.
 * @return the Deployed apps
 */
@Deployment
public static WebArchive createDeployment() {

    File[] files = Maven.resolver()
            .resolve(
            "io.opentracing:opentracing-api:0.30.0",
            "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.9.0"
            )
            .withTransitivity().asFile();

    WebArchive war = ShrinkWrap.create(WebArchive.class, "opentracing.war")
            .addPackages(true, OpentracingClientTests.class.getPackage())
            .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
            .addAsLibraries(files);

    return war;
}
 
開發者ID:eclipse,項目名稱:microprofile-opentracing,代碼行數:22,代碼來源:OpentracingClientTests.java

示例5: createTestArchive2

import org.jboss.shrinkwrap.api.asset.EmptyAsset; //導入依賴的package包/類
@Deployment(name= APP_NAME, order = 2, testable = false)
public static Archive<?> createTestArchive2() throws IOException {
    File[] files = Maven.resolver().loadPomFromFile("pom.xml")
                .importRuntimeDependencies().resolve().withTransitivity().asFile();

    return ShrinkWrap.create(WebArchive.class,  "app-jsp.war")
            .addPackages(true, Filters.exclude(".*Test.*"), Controller.class.getPackage())
            .addAsLibraries(files)
            .addAsWebResource(new File(WEBAPP_SRC, "index.jsp"))
            .addAsWebResource(new File(WEBAPP_SRC, "protected.jsp"))
            .addAsWebResource(new File(WEBAPP_SRC, "styles.css"))
            .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
            .addAsWebInfResource(new StringAsset(createClient(ClientBuilder.create(APP_NAME)
                    .rootUrl(ROOT_URL)
                    .accessType(PUBLIC))), "keycloak.json")
            .setWebXML(new File("src/main/webapp", "WEB-INF/web.xml"));
}
 
開發者ID:nmajorov,項目名稱:keycloak_training,代碼行數:18,代碼來源:ArquillianJeeJspTest.java

示例6: deploy

import org.jboss.shrinkwrap.api.asset.EmptyAsset; //導入依賴的package包/類
@Deployment
public static WebArchive deploy() {
    JavaArchive testJar = ShrinkWrap
            .create(JavaArchive.class, "arrayConverterTest.jar")
            .addPackage(PizzaConverter.class.getPackage())
            .addClass(ArrayConverterTest.class)
            .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
            .addAsServiceProvider(Converter.class, PizzaConverter.class)
            .as(JavaArchive.class);

    addFile(testJar, "META-INF/javaconfig.properties");

    WebArchive war = ShrinkWrap
            .create(WebArchive.class, "arrayConverterTest.war")
            .addAsLibrary(testJar);
    return war;
}
 
開發者ID:eclipse,項目名稱:ConfigJSR,代碼行數:18,代碼來源:ArrayConverterTest.java

示例7: deployAnotherApp

import org.jboss.shrinkwrap.api.asset.EmptyAsset; //導入依賴的package包/類
@Deployment
public static WebArchive deployAnotherApp() {
    JavaArchive testJar = ShrinkWrap
        .create(JavaArchive.class, "ftConfig.jar")
        .addClasses(BeanWithRetry.class)
        .addAsManifestResource(new StringAsset(
            "org.eclipse.microprofile.fault.tolerance.tck.config.BeanWithRetry/Retry/maxRetries=5" +
                "\nRetry/maxRetries=7"), "microprofile-config.properties")
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

    WebArchive war = ShrinkWrap
        .create(WebArchive.class, "ftConfigTest.war")
        .addAsLibrary(testJar);
    return war;
}
 
開發者ID:eclipse,項目名稱:microprofile-fault-tolerance,代碼行數:17,代碼來源:ConfigPropertyGlobalVsClassTest.java

示例8: deployAnotherApp

import org.jboss.shrinkwrap.api.asset.EmptyAsset; //導入依賴的package包/類
@Deployment
public static WebArchive deployAnotherApp() {
    JavaArchive testJar = ShrinkWrap
        .create(JavaArchive.class, "ftConfig.jar")
        .addClasses(BeanWithRetry.class)
        .addAsManifestResource(new StringAsset(
            "org.eclipse.microprofile.fault.tolerance.tck.config.BeanWithRetry/Retry/maxRetries=5" +
                "\norg.eclipse.microprofile.fault.tolerance.tck.config.BeanWithRetry/triggerException/Retry/maxRetries=6" +
                "\nRetry/maxRetries=7"), "microprofile-config.properties")
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

    WebArchive war = ShrinkWrap
        .create(WebArchive.class, "ftConfigTest.war")
        .addAsLibrary(testJar);
    return war;
}
 
開發者ID:eclipse,項目名稱:microprofile-fault-tolerance,代碼行數:18,代碼來源:ConfigPropertyGlobalVsClassVsMethodTest.java

示例9: deploy

import org.jboss.shrinkwrap.api.asset.EmptyAsset; //導入依賴的package包/類
@Deployment
public static WebArchive deploy() {
    JavaArchive testJar = ShrinkWrap
            .create(JavaArchive.class, "customConfigSourceTest.jar")
            .addClasses(CustomConfigSourceTest.class, CustomDbConfigSource.class, CustomConfigSourceProvider.class)
            .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
            .addAsServiceProvider(ConfigSource.class, CustomDbConfigSource.class)
            .addAsServiceProvider(ConfigSourceProvider.class, CustomConfigSourceProvider.class)
            .as(JavaArchive.class);

    addFile(testJar, "META-INF/javaconfig.properties");

    WebArchive war = ShrinkWrap
            .create(WebArchive.class, "customConfigSourceTest.war")
            .addAsLibrary(testJar);
    return war;
}
 
開發者ID:eclipse,項目名稱:ConfigJSR,代碼行數:18,代碼來源:CustomConfigSourceTest.java

示例10: deploy

import org.jboss.shrinkwrap.api.asset.EmptyAsset; //導入依賴的package包/類
@Deployment
public static WebArchive deploy() {
    JavaArchive testJar = ShrinkWrap
            .create(JavaArchive.class, "configProviderTest.jar")
            .addPackage(AbstractTest.class.getPackage())
            .addClass(ConfigProviderTest.class)
            .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
            .as(JavaArchive.class);

    AbstractTest.addFile(testJar, "META-INF/javaconfig.properties");

    WebArchive war = ShrinkWrap
            .create(WebArchive.class, "configProviderTest.war")
            .addAsLibrary(testJar);
    return war;
}
 
開發者ID:eclipse,項目名稱:ConfigJSR,代碼行數:17,代碼來源:ConfigProviderTest.java

示例11: deploy

import org.jboss.shrinkwrap.api.asset.EmptyAsset; //導入依賴的package包/類
@Deployment
public static WebArchive deploy() {
    JavaArchive testJar = ShrinkWrap.create(JavaArchive.class, "ftCircuitBreaker.jar")
        .addClasses(CircuitBreakerClientDefaultSuccessThreshold.class,
                    Misc.class)
        .addAsManifestResource(new StringAsset(
                                   "org.eclipse.microprofile.fault.tolerance.tck.circuitbreaker" +
                                       ".clientserver.CircuitBreakerClientDefaultSuccessThreshold/serviceA/CircuitBreaker/delay=200")
            , "microprofile-config.properties")
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

    WebArchive war = ShrinkWrap.create(WebArchive.class, "ftCircuitBreaker.war")
        .addAsLibrary(testJar);
    return war;
}
 
開發者ID:eclipse,項目名稱:microprofile-fault-tolerance,代碼行數:17,代碼來源:CircuitBreakerConfigOnMethodTest.java

示例12: deploy

import org.jboss.shrinkwrap.api.asset.EmptyAsset; //導入依賴的package包/類
@Deployment
public static WebArchive deploy() {
    JavaArchive testJar = ShrinkWrap.create(JavaArchive.class, "ftCircuitBreaker.jar")
                    .addClasses(CircuitBreakerClientWithDelay.class,
                                    CircuitBreakerClientNoDelay.class,
                                    CircuitBreakerClassLevelClientWithDelay.class,
                                    CircuitBreakerClientDefaultSuccessThreshold.class,
                                    CircuitBreakerClientHigherSuccessThreshold.class,
                                    Misc.class)
                    .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
                    .as(JavaArchive.class);

    WebArchive war = ShrinkWrap.create(WebArchive.class, "ftCircuitBreaker.war")
                    .addAsLibrary(testJar);
    return war;
}
 
開發者ID:eclipse,項目名稱:microprofile-fault-tolerance,代碼行數:17,代碼來源:CircuitBreakerTest.java

示例13: createDeployment

import org.jboss.shrinkwrap.api.asset.EmptyAsset; //導入依賴的package包/類
/**
 * Create war archive to test.
 *
 * @return the war used for testing
 */
public static Archive<?> createDeployment() {
    return ShrinkWrap.create(WebArchive.class)
            .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
            .addAsServiceProvider(Extension.class, LauncherExtension.class)
            .addPackages(true,
                         HttpEndpoints.class.getPackage(),
                         ForgeInitializer.class.getPackage())
            .addAsLibraries(Maven.resolver()
                                    .loadPomFromFile("pom.xml")
                                    .importCompileAndRuntimeDependencies()
                                    .resolve().withTransitivity().asFile());
}
 
開發者ID:fabric8-launcher,項目名稱:launcher-backend,代碼行數:18,代碼來源:Deployments.java

示例14: createDeployment

import org.jboss.shrinkwrap.api.asset.EmptyAsset; //導入依賴的package包/類
@Deployment
public static WebArchive createDeployment() {
    // Import Maven runtime dependencies
    final File[] dependencies = Maven.resolver().loadPomFromFile("pom.xml")
            .importRuntimeAndTestDependencies().resolve().withTransitivity().asFile();
    // Create deploy file
    return ShrinkWrap.create(WebArchive.class)
            .addPackages(false, Fabric8OpenShiftServiceImpl.class.getPackage(), OpenShiftServiceIT.class.getPackage(), OpenShiftService.class.getPackage())
            .addClasses(DeleteOpenShiftProjectRule.class, OpenShiftServiceSpi.class, OpenShiftTestCredentials.class)
            .addClasses(OpenShiftCluster.class, OpenShiftClusterRegistry.class, OpenShiftClusterRegistryImpl.class, OpenShiftClusterConstructor.class)
            .addAsResource("openshift-project-template.json")
            .addAsResource("foo-service-template.yaml")
            .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
            .addAsLibraries(dependencies);
}
 
開發者ID:fabric8-launcher,項目名稱:launcher-backend,代碼行數:16,代碼來源:OpenShiftServiceIT.java

示例15: deploy

import org.jboss.shrinkwrap.api.asset.EmptyAsset; //導入依賴的package包/類
@Deployment
public static WebArchive deploy() {
    JavaArchive testJar = ShrinkWrap
        .create(JavaArchive.class, "privateImplicitConverterTest.jar")
        .addPackage(ConvTestTypeWPrivateCharSequenceCt.class.getPackage())
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

    addFile(testJar, "META-INF/javaconfig.properties");

    WebArchive war = ShrinkWrap
        .create(WebArchive.class, "privateImplicitConverterTest.war")
        .addAsLibrary(testJar);
    return war;
}
 
開發者ID:eclipse,項目名稱:ConfigJSR,代碼行數:16,代碼來源:PrivateImplicitConverterTest.java


注:本文中的org.jboss.shrinkwrap.api.asset.EmptyAsset類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。