use of org.jboss.shrinkwrap.descriptor.api.webapp31.WebAppDescriptor in project tomee by apache.
the class StratocasterTest method createDeployment.
@Deployment(testable = false)
public static WebArchive createDeployment() {
WebAppDescriptor descriptor = Descriptors.create(WebAppDescriptor.class).version(WebAppVersionType._3_0).createServlet().servletName("servlet").servletClass(Stratocaster.class.getName()).up().createServletMapping().servletName("servlet").urlPattern("/" + TEST_NAME).up();
addEnvEntry(descriptor, "guitarStringGuages", "java.lang.String", "E1=0.052\nA=0.042\nD=0.030\nG=0.017\nB=0.013\nE=0.010");
addEnvEntry(descriptor, "certificateOfAuthenticity", "java.lang.String", "/tmp/strat-certificate.txt");
addEnvEntry(descriptor, "dateCreated", "java.lang.String", "1962-03-01");
addEnvEntry(descriptor, "pickups", "java.lang.String", "S,S,S");
addEnvEntry(descriptor, "style", "java.lang.String", "VINTAGE");
WebArchive archive = ShrinkWrap.create(WebArchive.class, TEST_NAME + ".war").addClass(PojoServlet.class).addClass(Code.class).addClass(Stratocaster.class).addClass(Pickup.class).addClass(PickupEditor.class).addClass(Style.class).addAsLibraries(JarLocation.jarLocation(Test.class)).setWebXML(new StringAsset(descriptor.exportAsString()));
return archive;
}
use of org.jboss.shrinkwrap.descriptor.api.webapp31.WebAppDescriptor in project tomee by apache.
the class ServletListenerEjbRemoteTest method createDeployment.
@Deployment(testable = false)
public static WebArchive createDeployment() {
WebAppDescriptor descriptor = Descriptors.create(WebAppDescriptor.class).version("3.0").createListener().listenerClass(RemoteServletContextListener.class.getName()).up().createListener().listenerClass(RemoteServletSessionListener.class.getName()).up().createServlet().servletName("check").servletClass(ServletToCheckListener.class.getName()).up().createServletMapping().servletName("check").urlPattern("/" + TEST_NAME).up();
WebArchive archive = ShrinkWrap.create(WebArchive.class, TEST_NAME + ".war").addClass(RemoteServletContextListener.class).addClass(RemoteServletSessionListener.class).addClass(ServletToCheckListener.class).addClass(CompanyRemote.class).addClass(DefaultCompany.class).addClass(ContextAttributeName.class).setWebXML(new StringAsset(descriptor.exportAsString())).addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));
return archive;
}
use of org.jboss.shrinkwrap.descriptor.api.webapp31.WebAppDescriptor in project tomee by apache.
the class IvmContextTest method createDeployment.
@Deployment(testable = false)
public static WebArchive createDeployment() {
WebAppDescriptor descriptor = Descriptors.create(WebAppDescriptor.class).version(WebAppVersionType._3_0).createServlet().servletName(SERVLET_NAME).servletClass(IvmContextServlet.class.getName()).up().createServletMapping().servletName(SERVLET_NAME).urlPattern("/" + TEST_NAME).up();
WebArchive archive = ShrinkWrap.create(WebArchive.class, TEST_NAME + ".war").addClass(IvmContextTest.class).addClass(IvmContextServlet.class).addClass(NamingBean.class).addClass(Runner.class).addAsLibraries(JarLocation.jarLocation(Test.class)).addAsWebInfResource(new ClassLoaderAsset(CONTENT_LOCATION_EJB_JAR_XML), RESOURCE_EJB_JAR_XML).setWebXML(new StringAsset(descriptor.exportAsString()));
return archive;
}
use of org.jboss.shrinkwrap.descriptor.api.webapp31.WebAppDescriptor in project tomee by apache.
the class SessionSynchronizationCallbackTest method createDeployment.
@Deployment(testable = false)
public static WebArchive createDeployment() {
WebAppDescriptor descriptor = Descriptors.create(WebAppDescriptor.class).version(WebAppVersionType._3_0).createServlet().servletName(SERVLET_NAME).servletClass(SessionSynchronizationCallbackServlet.class.getName()).up().createServletMapping().servletName(SERVLET_NAME).urlPattern("/" + TEST_NAME).up();
WebArchive archive = ShrinkWrap.create(WebArchive.class, TEST_NAME + ".war").addClass(SessionSynchronizationCallbackServlet.class).addClass(StatefulBean.class).addClass(TestEntity.class).addClass(Runner.class).addAsLibraries(JarLocation.jarLocation(Test.class)).addAsResource(new ClassLoaderAsset(PERSISTENCE_XML_SOURCE), PERSISTENCE_XML_DESTINATION).setWebXML(new StringAsset(descriptor.exportAsString()));
return archive;
}
use of org.jboss.shrinkwrap.descriptor.api.webapp31.WebAppDescriptor in project tomee by apache.
the class MultiplePersistenceTest method createDeployment.
@Deployment(testable = false)
public static WebArchive createDeployment() {
WebAppDescriptor descriptor = Descriptors.create(WebAppDescriptor.class).version(WebAppVersionType._3_0).createServlet().servletName("check").servletClass(MultiplePUServlet.class.getName()).up().createServletMapping().servletName("check").urlPattern("/" + TEST_NAME).up();
WebArchive archive = ShrinkWrap.create(WebArchive.class, TEST_NAME + ".war").addClass(MultiplePUServlet.class).addClass(Person1.class).addClass(Person2.class).addClass(Runner.class).addAsLibraries(JarLocation.jarLocation(Test.class)).addAsResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/persistence/multiple/persistence.xml"), "META-INF/persistence.xml").setWebXML(new StringAsset(descriptor.exportAsString()));
return archive;
}
Aggregations