本文整理匯總了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");
}