@Deployment
public static Archive createDeployment()
{
final GenericArchive webResources = ShrinkWrap.create(GenericArchive.class)
.as(ExplodedImporter.class)
.importDirectory("src/main/webapp")
.as(GenericArchive.class);
final File[] seleniumApi = Maven.resolver()
.loadPomFromFile("pom.xml")
.resolve("org.seleniumhq.selenium:selenium-api:2.35.0")
.withTransitivity()
.asFile();
return ShrinkWrap.create(WebArchive.class, NoteResourceImplTest.class.getSimpleName() + ".war")
.addClasses(Note.class, NoteApp.class, NoteResource.class, NoteResourceImpl.class)
.addAsResource("META-INF/persistence.xml")
.addAsWebInfResource("enforce-beans.xml", "jboss-all.xml")
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
.addAsLibraries(seleniumApi)
.merge(webResources);
}