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