本文整理汇总了Java中org.jboss.shrinkwrap.api.spec.JavaArchive类的典型用法代码示例。如果您正苦于以下问题:Java JavaArchive类的具体用法?Java JavaArchive怎么用?Java JavaArchive使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JavaArchive类属于org.jboss.shrinkwrap.api.spec包,在下文中一共展示了JavaArchive类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: deploy
import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入依赖的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;
}
示例2: deploy
import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入依赖的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;
}
示例3: deploy
import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入依赖的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;
}
示例4: deploy
import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入依赖的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;
}
示例5: deploy
import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入依赖的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;
}
示例6: deploy
import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入依赖的package包/类
@Deployment
public static WebArchive deploy() {
JavaArchive testJar = ShrinkWrap
.create(JavaArchive.class, "ftConfig.jar")
.addClasses(ConfigClient.class, ConfigClassLevelClient.class, ConfigClassLevelMaxDurationClient.class)
.addAsManifestResource(new StringAsset(
"org.eclipse.microprofile.fault.tolerance.tck.config.clientserver.ConfigClient/serviceA/Retry/maxRetries=3"+
"\norg.eclipse.microprofile.fault.tolerance.tck.config.clientserver.ConfigClassLevelClient/Retry/maxRetries=3"+
"\norg.eclipse.microprofile.fault.tolerance.tck.config.clientserver.ConfigClient/serviceC/Retry/maxDuration=1000"+
"\norg.eclipse.microprofile.fault.tolerance.tck.config.clientserver.ConfigClassLevelMaxDurationClient/Retry/maxDuration=1000"),
"microprofile-config.properties")
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
.as(JavaArchive.class);
WebArchive war = ShrinkWrap
.create(WebArchive.class, "ftConfig.war")
.addAsLibrary(testJar);
return war;
}
示例7: deployAnotherApp
import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入依赖的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;
}
示例8: deploy
import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入依赖的package包/类
@ShouldThrowException(DeploymentException.class)
@Deployment
public static WebArchive deploy() {
JavaArchive testJar = ShrinkWrap
.create(JavaArchive.class, "missingConverterOnInstanceInjectionTest.jar")
.addClass(CustomConverterBean.class)
.addAsManifestResource(new StringAsset("my.customtype.value=xxxxx"), "javaconfig.properties")
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
.as(JavaArchive.class);
WebArchive war = ShrinkWrap
.create(WebArchive.class, "missingConverterOnInstanceInjectionTest.war")
.addAsLibrary(testJar);
return war;
}
示例9: deploy
import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入依赖的package包/类
@Deployment
@ShouldThrowException(value = DefinitionException.class, testable = true)
public static WebArchive deploy() {
JavaArchive testJar = ShrinkWrap
.create(JavaArchive.class, "ftInvalidBulkhead3.jar")
.addClasses(BulkheadClientForValidationAsynchQueue.class)
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
.as(JavaArchive.class);
return ShrinkWrap
.create(WebArchive.class, "ftInvalidBulkhead3.war")
.addAsLibrary(testJar);
}
示例10: deploy
import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入依赖的package包/类
@Deployment
public static WebArchive deploy() {
JavaArchive testJar = ShrinkWrap
.create(JavaArchive.class, "ftAsyncTimeout.jar")
.addClasses(AsyncTimeoutClient.class,AsyncClassLevelTimeoutClient.class,Connection.class)
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
.as(JavaArchive.class);
WebArchive war = ShrinkWrap
.create(WebArchive.class, "ftAsyncTimeout.war")
.addAsLibrary(testJar);
return war;
}
示例11: createEJBDeployment
import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入依赖的package包/类
@Deployment
public static JavaArchive createEJBDeployment() {
final JavaArchive jar = create(JavaArchive.class, "scopes-test.jar");
jar.addPackage(MyPosts.class.getPackage());
jar.addAsManifestResource(new FileAsset(new File("src/test/resources/META-INF/persistence-test.xml")),
"persistence.xml");
return jar;
}
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:9,代码来源:ScopesTestCase.java
示例12: deploy
import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入依赖的package包/类
@Deployment
public static WebArchive deploy() {
JavaArchive testJar = ShrinkWrap.create(JavaArchive.class, "ftCircuitBreakerRetry.jar")
.addClasses(CircuitBreakerClientWithRetry.class, CircuitBreakerClassLevelClientWithRetry.class)
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
.as(JavaArchive.class);
WebArchive war = ShrinkWrap.create(WebArchive.class, "ftCircuitBreakerRetry.war")
.addAsLibrary(testJar);
return war;
}
示例13: createEnterpriseDeployment
import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入依赖的package包/类
@Deployment
public static EnterpriseArchive createEnterpriseDeployment() {
final EnterpriseArchive ear = create(EnterpriseArchive.class, "sendmail.ear");
final JavaArchive jar = create(JavaArchive.class, "sendmail.jar");
File[] files = resolver().loadPomFromFile("pom.xml").importRuntimeDependencies()
.resolve("org.subethamail:subethasmtp:3.1.7").withTransitivity().asFile();
jar.addPackage(SendMail.class.getPackage());
ear.addAsModule(jar);
ear.addAsLibraries(files);
return ear;
}
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:12,代码来源:SendMailTestCase.java
示例14: deploy
import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入依赖的package包/类
@Deployment
public static WebArchive deploy() {
JavaArchive testJar = ShrinkWrap.create(JavaArchive.class, "ftRetryCondition.jar")
.addClasses(RetryClientAbortOn.class, RetryClientRetryOn.class,
RetryClassLevelClientRetryOn.class,
RetryClassLevelClientAbortOn.class)
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
.as(JavaArchive.class);
WebArchive war = ShrinkWrap
.create(WebArchive.class, "ftRetryCondition.war")
.addAsLibrary(testJar);
return war;
}
示例15: createSemiGuardedMethodDeployment
import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入依赖的package包/类
@Deployment(managed = false, name = "FAILING_SEMI_GUARDED_METHOD")
public static WebArchive createSemiGuardedMethodDeployment() {
final JavaArchive as = ShrinkWrap.create(MavenImporter.class)
.loadPomFromFile("pom.xml")
.importBuildOutput()
.as(JavaArchive.class);
return ShrinkWrap.create(WebArchive.class)
.addAsLibrary(as)
.addClass(IncorrectSemisafeMethodContractBean.class)
.addAsWebInfResource("beans.xml");
}