Search in sources :

Example 46 with WebArchive

use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.

the class RootContextEarUnitTestCase method earDeployment.

@Deployment(name = "root-web.ear", testable = false)
public static EnterpriseArchive earDeployment() {
    ClassLoader tccl = Thread.currentThread().getContextClassLoader();
    String resourcesLocation = "org/jboss/as/test/integration/web/rootcontext/resources/";
    WebArchive war = ShrinkWrap.create(WebArchive.class, "root-web.war");
    war.setWebXML(tccl.getResource(resourcesLocation + "root-web.xml"));
    war.addAsWebInfResource(tccl.getResource(resourcesLocation + "jboss-web.xml"), "jboss-web.xml");
    war.addAsWebResource(tccl.getResource(resourcesLocation + "index.html"), "index.html");
    EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "root-web.ear");
    ear.setApplicationXML(tccl.getResource(resourcesLocation + "application-root.xml"));
    ear.addAsModule(war);
    return ear;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) OperateOnDeployment(org.jboss.arquillian.container.test.api.OperateOnDeployment) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 47 with WebArchive

use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.

the class RootContextWarUnitTestCase method warDeployment.

@Deployment(name = "root-context.war", testable = false)
public static WebArchive warDeployment() {
    ClassLoader tccl = Thread.currentThread().getContextClassLoader();
    String resourcesLocation = "org/jboss/as/test/integration/web/rootcontext/resources/";
    WebArchive war = ShrinkWrap.create(WebArchive.class, "root-context.war");
    war.setWebXML(tccl.getResource(resourcesLocation + "root-web.xml"));
    war.addAsWebInfResource(tccl.getResource(resourcesLocation + "jboss-web.xml"), "jboss-web.xml");
    war.addAsWebResource(tccl.getResource(resourcesLocation + "index.html"), "index.html");
    return war;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) OperateOnDeployment(org.jboss.arquillian.container.test.api.OperateOnDeployment) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 48 with WebArchive

use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.

the class CookieUnitTestCase method deployment.

@Deployment(testable = false)
public static WebArchive deployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class, "jbosstest-cookie.war");
    war.addClass(CookieReadServlet.class);
    war.addClass(CookieServlet.class);
    return war;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 49 with WebArchive

use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.

the class CustomErrorsUnitTestCase method producerDeployment.

@Deployment(name = "error-producer.war", testable = false)
public static WebArchive producerDeployment() {
    ClassLoader tccl = Thread.currentThread().getContextClassLoader();
    String resourcesLocation = "org/jboss/as/test/integration/web/customerrors/resources/";
    WebArchive war = ShrinkWrap.create(WebArchive.class, "error-producer.war");
    war.setWebXML(tccl.getResource(resourcesLocation + "error-producer-web.xml"));
    war.addAsManifestResource(CustomErrorsUnitTestCase.class.getPackage(), "permissions.xml", "permissions.xml");
    war.addClass(ErrorGeneratorServlet.class);
    war.addClass(ContextForwardServlet.class);
    return war;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) OperateOnDeployment(org.jboss.arquillian.container.test.api.OperateOnDeployment) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 50 with WebArchive

use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.

the class InjectionTestCase method deployment.

@Deployment
public static Archive<?> deployment() {
    // construct shared jar
    JavaArchive sharedJar = ShrinkWrap.create(JavaArchive.class, "jaxws-injection.jar");
    sharedJar.addClass(BeanIface.class);
    sharedJar.addClass(BeanImpl.class);
    // construct ejb3 jar
    JavaArchive ejb3Jar = ShrinkWrap.create(JavaArchive.class, "jaxws-injection-ejb3.jar");
    ejb3Jar.addClass(EJB3Bean.class);
    ejb3Jar.addClass(TestHandler.class);
    ejb3Jar.addClass(AbstractEndpointImpl.class);
    ejb3Jar.addClass(EndpointIface.class);
    ejb3Jar.addAsResource(EJB3Bean.class.getPackage(), "jaxws-handler.xml", "org/jboss/as/test/integration/ws/injection/ejb/basic/webservice/jaxws-handler.xml");
    ejb3Jar.addAsManifestResource(EJB3Bean.class.getPackage(), "ejb-jar.xml", "ejb-jar.xml");
    ejb3Jar.addAsManifestResource(new StringAsset("Dependencies: deployment.jaxws-injection.ear.jaxws-injection.jar"), "MANIFEST.MF");
    // construct pojo war
    WebArchive pojoWar = ShrinkWrap.create(WebArchive.class, "jaxws-injection-pojo.war");
    pojoWar.addClass(POJOBean.class);
    pojoWar.addClass(TestHandler.class);
    pojoWar.addClass(AbstractEndpointImpl.class);
    pojoWar.addClass(EndpointIface.class);
    pojoWar.addAsResource(POJOBean.class.getPackage(), "jaxws-handler.xml", "org/jboss/as/test/integration/ws/injection/ejb/basic/webservice/jaxws-handler.xml");
    pojoWar.addAsWebInfResource(POJOBean.class.getPackage(), "web.xml", "web.xml");
    pojoWar.addAsManifestResource(new StringAsset("Dependencies: deployment.jaxws-injection.ear.jaxws-injection.jar"), "MANIFEST.MF");
    // construct ear
    EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "jaxws-injection.ear");
    ear.addAsModule(sharedJar);
    ear.addAsModule(ejb3Jar);
    ear.addAsModule(pojoWar);
    return ear;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) EJB3Bean(org.jboss.as.test.integration.ws.injection.ejb.basic.webservice.EJB3Bean) POJOBean(org.jboss.as.test.integration.ws.injection.ejb.basic.webservice.POJOBean) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Aggregations

WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)519 Deployment (org.jboss.arquillian.container.test.api.Deployment)421 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)170 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)110 EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)89 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)80 HttpRequest (org.jboss.as.test.integration.common.HttpRequest)28 File (java.io.File)25 WebAppDescriptor (org.jboss.shrinkwrap.descriptor.api.webapp30.WebAppDescriptor)25 BatchTestHelper (org.javaee7.util.BatchTestHelper)13 PropertyPermission (java.util.PropertyPermission)11 ZipExporter (org.jboss.shrinkwrap.api.exporter.ZipExporter)11 SocketPermission (java.net.SocketPermission)10 ZipExporterImpl (org.jboss.shrinkwrap.impl.base.exporter.zip.ZipExporterImpl)10 CommonCriteria (org.jboss.as.test.categories.CommonCriteria)9 BeforeClass (org.junit.BeforeClass)9 Test (org.junit.Test)9 ClassLoaderAsset (org.jboss.shrinkwrap.api.asset.ClassLoaderAsset)8 Runner (org.apache.openejb.arquillian.tests.Runner)7 Util (org.jboss.as.test.shared.integration.ejb.security.Util)7