use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class InitializeInOrderTestCase method deployment.
@Deployment
public static Archive<?> deployment() {
final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "init.ear");
ear.addAsResource(InitializeInOrderTestCase.class.getPackage(), "application.xml", "application.xml");
final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "ejb.jar");
jar.addClasses(MyEjb.class, InitializeInOrderTestCase.class);
ear.addAsModule(jar);
final WebArchive war = ShrinkWrap.create(WebArchive.class, "web.war");
war.addClass(MyServlet.class);
ear.addAsModule(war);
return ear;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class SubDirectoryModuleDeploymentTestCase method createDeployment.
@Deployment
public static Archive<?> createDeployment() {
final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "subdirectory.ear");
final JavaArchive jarOne = ShrinkWrap.create(JavaArchive.class, "ejb.jar");
jarOne.addClass(MessageBean.class);
ear.addAsModule(new ArchiveAsset(jarOne, ZipExporter.class), "subdir/ejb/ejb.jar");
final WebArchive war = ShrinkWrap.create(WebArchive.class, "web.war");
war.addClass(MessageServlet.class);
ear.addAsModule(new ArchiveAsset(war, ZipExporter.class), "subdir/web/web.war");
return ear;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class InfinispanResourceRefTestCase method deployment.
@Deployment
public static Archive<?> deployment() {
WebArchive war = ShrinkWrap.create(WebArchive.class, "infinispan-resource-ref.war");
war.addClasses(InfinispanBean.class, InfinispanResourceRefTestCase.class);
war.addAsWebInfResource(getWebXml(), "web.xml");
war.setManifest(new StringAsset(Descriptors.create(ManifestDescriptor.class).attribute("Dependencies", "org.infinispan export").exportAsString()));
war.addAsManifestResource(createPermissionsXmlAsset(new MBeanPermission("-#-[-]", "queryNames"), new MBeanPermission("org.infinispan.*[jboss.infinispan:*,type=Cache]", "registerMBean"), new ReflectPermission("suppressAccessChecks"), new RuntimePermission("accessDeclaredMembers"), new RuntimePermission("getClassLoader")), "permissions.xml");
return war;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class PersistenceContextRefTestCase method deploy.
@Deployment
public static Archive<?> deploy() {
WebArchive war = ShrinkWrap.create(WebArchive.class, ARCHIVE_NAME + ".war");
war.addPackage(PersistenceContextRefTestCase.class.getPackage());
war.addAsResource(new StringAsset(persistence_xml), "META-INF/persistence.xml");
war.addAsWebInfResource(getWebXml(), "web.xml");
return war;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class ProducerInjectionTestCase method getSimpleEar.
@Deployment(name = SIMPLE_EAR, testable = false)
public static Archive<?> getSimpleEar() {
WebArchive war = ShrinkWrap.create(WebArchive.class, SIMPLE_WAR);
war.addClasses(SimpleBeanServlet.class);
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, SIMPLE_CDI_JAR);
jar.addClasses(SimpleManagedBean.class, SimpleProducerBean.class);
jar.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, SIMPLE_EAR);
ear.addAsModule(war);
ear.addAsModule(jar);
return ear;
}
Aggregations