Search in sources :

Example 91 with EnterpriseArchive

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

the class EarLibTestCase method getDeployment.

@Deployment(testable = false)
public static Archive<?> getDeployment() {
    final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "ws-app.ear");
    final WebArchive war = ShrinkWrap.create(WebArchive.class, "ws-example.war");
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "endpoint.jar");
    jar.addClasses(EndpointIface.class, PojoEndpoint.class, HelloObject.class);
    war.setWebXML(EarLibTestCase.class.getPackage(), "web.xml");
    ear.addAsDirectory("/lib");
    ear.add(jar, "/lib", ZipExporter.class);
    ear.add(war, "/", ZipExporter.class);
    return ear;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 92 with EnterpriseArchive

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

the class AS1675TestCase method deployment.

@Deployment
public static Archive<?> deployment() {
    // construct shared jar
    JavaArchive sharedJar = ShrinkWrap.create(JavaArchive.class, "shared.jar");
    sharedJar.addClass(BeanIface.class);
    sharedJar.addClass(BeanImpl.class);
    sharedJar.addClass(EndpointIface.class);
    sharedJar.addClass(AbstractEndpointImpl.class);
    // construct ejb3 jar
    JavaArchive ejb3Jar = ShrinkWrap.create(JavaArchive.class, "ejb3.jar");
    ejb3Jar.addClass(EJB3Bean.class);
    ejb3Jar.addClass(AS1675TestCase.class);
    ejb3Jar.addAsManifestResource(new StringAsset(EJB_JAR), "ejb-jar.xml");
    // construct ear
    EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "as1675.ear");
    ear.addAsModule(sharedJar);
    ear.addAsModule(ejb3Jar);
    // return ear
    return ear;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 93 with EnterpriseArchive

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

the class SharedSessionTestCase method sharedSessionEarDeployment.

@Deployment(name = EAR_DEPLOYMENT_SHARED_SESSIONS)
public static Archive<?> sharedSessionEarDeployment() {
    WebArchive war1 = ShrinkWrap.create(WebArchive.class, "war1.war").addClass(SharedSessionServlet.class);
    WebArchive war2 = ShrinkWrap.create(WebArchive.class, "war2.war").addClass(SharedSessionServlet.class);
    EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, EAR_DEPLOYMENT_SHARED_SESSIONS).addAsModule(war1).addAsModule(war2).addAsManifestResource(SharedSessionTestCase.class.getPackage(), "jboss-all.xml", "jboss-all.xml");
    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 94 with EnterpriseArchive

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

the class SharedSessionTestCase method notSharedEarDeployment.

@Deployment(name = EAR_DEPLOYMENT_NOT_SHARED_SESSIONS)
public static Archive<?> notSharedEarDeployment() {
    WebArchive war1 = ShrinkWrap.create(WebArchive.class, "warX.war").addClass(SharedSessionServlet.class);
    WebArchive war2 = ShrinkWrap.create(WebArchive.class, "warY.war").addClass(SharedSessionServlet.class);
    EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, EAR_DEPLOYMENT_NOT_SHARED_SESSIONS).addAsModule(war1).addAsModule(war2);
    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 95 with EnterpriseArchive

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

the class EJBClientXidTransactionTestCase method createDeployment.

/**
     * Creates an EJB deployment
     *
     * @return
     */
@Deployment
public static Archive<?> createDeployment() {
    final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, APP_NAME + ".ear");
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, MODULE_NAME + ".jar");
    jar.addPackage(EJBClientXidTransactionTestCase.class.getPackage());
    jar.addAsManifestResource(EJBClientXidTransactionTestCase.class.getPackage(), "persistence.xml", "persistence.xml");
    ear.addAsModule(jar);
    return ear;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Aggregations

EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)164 Deployment (org.jboss.arquillian.container.test.api.Deployment)143 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)139 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)85 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)58 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)21 ResourceAdapterArchive (org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive)15 BeforeClass (org.junit.BeforeClass)10 File (java.io.File)8 ModelNode (org.jboss.dmr.ModelNode)8 OperationBuilder (org.jboss.as.controller.client.OperationBuilder)7 HttpRequest (org.jboss.as.test.integration.common.HttpRequest)6 AbstractMgmtTestBase (org.jboss.as.test.integration.management.base.AbstractMgmtTestBase)4 ByteArrayAsset (org.jboss.shrinkwrap.api.asset.ByteArrayAsset)4 ApplicationDescriptor (org.jboss.shrinkwrap.descriptor.api.application6.ApplicationDescriptor)4 WebAppDescriptor (org.jboss.shrinkwrap.descriptor.api.webapp30.WebAppDescriptor)4 Properties (java.util.Properties)3 PropertyPermission (java.util.PropertyPermission)3 ZipExporter (org.jboss.shrinkwrap.api.exporter.ZipExporter)3 ZipExporterImpl (org.jboss.shrinkwrap.impl.base.exporter.zip.ZipExporterImpl)3