Search in sources :

Example 41 with EnterpriseArchive

use of org.jboss.shrinkwrap.api.spec.EnterpriseArchive 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;
}
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 42 with EnterpriseArchive

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

the class SharedBeanInEarsUnitTestCase method deployB.

@Deployment(name = "b", testable = false, managed = true)
public static Archive<?> deployB() {
    EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, APP_B + ".ear");
    JavaArchive jarB = ShrinkWrap.create(JavaArchive.class, MOD_B + ".jar");
    jarB.addClasses(BEJB.class, BEJBBean.class);
    JavaArchive jarBshared = ShrinkWrap.create(JavaArchive.class, MOD_B_SHARED + ".jar");
    jarBshared.addClasses(Shared.class, SharedBean.class);
    jarBshared.addAsManifestResource(SharedBeanInEarsUnitTestCase.class.getPackage(), "ejb-jar-b.xml", "ejb-jar.xml");
    ear.addAsModule(jarB);
    ear.addAsModule(jarBshared);
    ear.addAsManifestResource(SharedBeanInEarsUnitTestCase.class.getPackage(), "application-b.xml", "application.xml");
    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)

Example 43 with EnterpriseArchive

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

the class EjbRefLookupTestCase method deployEar.

@Deployment(order = 0, name = EAR_DEPLOYMENT)
public static Archive<?> deployEar() {
    EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, EAR_DEPLOYMENT + ".ear");
    JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "ejb.jar").addClasses(RemoteInterface.class, RemoteInterfaceBean.class);
    ear.addAsModule(ejbJar);
    return ear;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) OperateOnDeployment(org.jboss.arquillian.container.test.api.OperateOnDeployment) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 44 with EnterpriseArchive

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

the class DeploymentPackagedRATestCase method createDeplyoment.

@Deployment
public static Archive createDeplyoment() {
    final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, EAR_NAME + ".ear");
    final JavaArchive rar = ShrinkWrap.create(JavaArchive.class, RAR_NAME + ".rar");
    rar.addAsManifestResource(DeploymentPackagedRATestCase.class.getPackage(), "ra.xml", "ra.xml");
    final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, EJB_JAR_NAME + ".jar");
    ejbJar.addClasses(NonJMSMDB.class, DeploymentPackagedRATestCase.class);
    final JavaArchive libJar = ShrinkWrap.create(JavaArchive.class, "common-lib.jar");
    libJar.addClasses(SimpleActivationSpec.class, SimpleResourceAdapter.class, SimpleMessageListener.class, ResourceAdapterDeploymentTracker.class);
    ear.addAsModule(rar);
    ear.addAsModule(ejbJar);
    ear.addAsLibrary(libJar);
    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)

Example 45 with EnterpriseArchive

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

the class EJBClientAPIUsageTestCase 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(EJBClientAPIUsageTestCase.class.getPackage());
    jar.addAsManifestResource(EmptyAsset.INSTANCE, "beans.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)257 Deployment (org.jboss.arquillian.container.test.api.Deployment)207 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)187 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)127 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)82 File (java.io.File)39 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)35 BeforeClass (org.junit.BeforeClass)22 ResourceAdapterArchive (org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive)16 ModelNode (org.jboss.dmr.ModelNode)15 OperationBuilder (org.jboss.as.controller.client.OperationBuilder)14 ZipExporterImpl (org.jboss.shrinkwrap.impl.base.exporter.zip.ZipExporterImpl)11 HttpRequest (org.jboss.as.test.integration.common.HttpRequest)8 BasicPath (org.jboss.shrinkwrap.impl.base.path.BasicPath)8 Test (org.junit.Test)8 Document (org.w3c.dom.Document)8 HashMap (java.util.HashMap)7 GatewayConfig (org.apache.knox.gateway.config.GatewayConfig)7 Topology (org.apache.knox.gateway.topology.Topology)7 PropertyPermission (java.util.PropertyPermission)6