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;
}
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;
}
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;
}
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;
}
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;
}
Aggregations