public static WebArchive war()
{
String simpleName = ScopedPartialBeanTest.class.getSimpleName();
String archiveName = simpleName.substring(0, 1).toLowerCase() + simpleName.substring(1);
JavaArchive testJar = ShrinkWrap.create(JavaArchive.class, archiveName + ".jar")
.addPackage(ScopedPartialBeanTest.class.getPackage())
.addPackage(TestPartialBeanBinding.class.getPackage())
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
WebArchive webArchive = ShrinkWrap.create(WebArchive.class, archiveName + ".war")
.addAsLibraries(ArchiveUtils.getDeltaSpikeCoreAndPartialBeanArchive())
.addAsLibraries(testJar)
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
if (CdiContainerUnderTest.is("owb-.*") ||
CdiContainerUnderTest.is("tomee-.*") ||
CdiContainerUnderTest.is("wildfly-.*") ||
CdiContainerUnderTest.is("glassfish-.*"))
{
JavaArchive javassistJar = ShrinkWrap.create(JavaArchive.class, "dsjavassist.jar")
.addPackages(true, "javassist");
webArchive.addAsLibrary(javassistJar);
}
return webArchive;