Search in sources :

Example 26 with EnterpriseArchive

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

the class HibernateJarsInDeploymentTestCase method deploy.

@Deployment
public static Archive<?> deploy() throws Exception {
    EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, ARCHIVE_NAME + ".ear");
    addHibernate42xJars(ear);
    JavaArchive lib = ShrinkWrap.create(JavaArchive.class, "beans.jar");
    lib.addClasses(SFSB1.class, HibernateJarsInDeploymentTestCase.class);
    lib.addAsManifestResource(HibernateJarsInDeploymentTestCase.class.getPackage(), "persistence.xml", "persistence.xml");
    ear.addAsManifestResource(HibernateJarsInDeploymentTestCase.class.getPackage(), "permissions.xml", "permissions.xml");
    ear.addAsManifestResource(new StringAsset("Dependencies: org.javassist export, org.jboss.jandex\n"), "MANIFEST.MF");
    ear.addAsModule(lib);
    lib = ShrinkWrap.create(JavaArchive.class, "lib.jar");
    lib.addClass(LibClass.class);
    ear.addAsLibrary(lib);
    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 27 with EnterpriseArchive

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

the class ReferenceEarTestCase method deployment.

@Deployment
public static Archive<?> deployment() {
    final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "multideploy-reference21_31-test.ear");
    final JavaArchive jar1 = ShrinkWrap.create(JavaArchive.class, "multideploy-ejb2.jar").addClasses(Test2.class, Test2Bean.class, Test2Home.class);
    jar1.addClass(ReferenceEarTestCase.class);
    jar1.addAsManifestResource(ReferenceEarTestCase.class.getPackage(), "jboss-ejb3-ejb2.xml", "jboss-ejb3.xml");
    jar1.addAsManifestResource(ReferenceEarTestCase.class.getPackage(), "ejb-jar-ejb2.xml", "ejb-jar.xml");
    final JavaArchive jar2 = ShrinkWrap.create(JavaArchive.class, "multideploy-ejb3.jar").addClasses(Test3.class, Test3Business.class, Test3Home.class, Test3Bean.class);
    jar2.addAsManifestResource(ReferenceEarTestCase.class.getPackage(), "jboss-ejb3-ejb3.xml", "jboss-ejb3.xml");
    jar2.addAsManifestResource(ReferenceEarTestCase.class.getPackage(), "ejb-jar-ejb3.xml", "ejb-jar.xml");
    ear.addAsModule(jar1);
    ear.addAsModule(jar2);
    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 28 with EnterpriseArchive

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

the class EjbDuplicateBindingTestCase method deploy.

@Deployment
public static Archive<?> deploy() {
    final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "testglobal.ear");
    final JavaArchive b1 = ShrinkWrap.create(JavaArchive.class, "b1.jar");
    b1.addPackage(EjbDuplicateBindingTestCase.class.getPackage());
    ear.addAsModule(b1);
    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 29 with EnterpriseArchive

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

the class HTTPEJBClientUserTransactionTestCase 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(HTTPEJBClientUserTransactionTestCase.class.getPackage());
    jar.addAsManifestResource(HTTPEJBClientUserTransactionTestCase.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)

Example 30 with EnterpriseArchive

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

the class HTTPEJBClientXidTransactionTestCase 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(HTTPEJBClientXidTransactionTestCase.class.getPackage());
    jar.addAsManifestResource(HTTPEJBClientXidTransactionTestCase.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)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