public class ResourceRefTestCase {
private static final Logger log = Logger.getLogger(ResourceRefTestCase.class);
@Deployment
public static Archive<?> deployment() {
EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "resourcerref.ear");
WebArchive war = ShrinkWrap.create(WebArchive.class, "managed-bean.war");
war.addAsWebInfResource(ResourceRefTestCase.class.getPackage(),"web.xml", "web.xml");
war.addClasses(ResourceRefTestCase.class, DatasourceManagedBean.class);
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "resource-ref-test.jar");
jar.addClasses(ResourceRefBean.class, ResourceRefRemote.class, StatelessBean.class, StatelessBeanRemote.class, ResUrlChecker.class, ResUrlCheckerBean.class);
jar.addAsManifestResource(ResourceRefTestCase.class.getPackage(),"jboss-ejb3.xml", "jboss-ejb3.xml");
jar.addAsManifestResource(ResourceRefTestCase.class.getPackage(),"ejb-jar.xml", "ejb-jar.xml");
ear.addAsModule(jar);
ear.addAsModule(war);
log.info(ear.toString(true));
return ear;
}