use of org.jboss.shrinkwrap.impl.BeansXml in project core by weld.
the class IncontainerTest method getDeployment.
@Deployment
public static WebArchive getDeployment() {
WebArchive war = ShrinkWrap.create(WebArchive.class, Utils.getDeploymentNameAsHash(IncontainerTest.class, Utils.ARCHIVE_TYPE.WAR)).addClasses(Alpha.class, MarkerObtainer1.class, Foo.class, Marker.class).addAsWebInfResource(new BeansXml().alternatives(Alpha.class), "beans.xml");
JavaArchive bda1 = ShrinkWrap.create(JavaArchive.class).addClasses(Bravo.class, MarkerObtainer2.class, Bar.class).addAsManifestResource(new BeansXml().alternatives(Bravo.class), "beans.xml");
JavaArchive bda2 = ShrinkWrap.create(JavaArchive.class).addClasses(Charlie.class, MarkerObtainer3.class, Baz.class).addAsManifestResource(new BeansXml().alternatives(Charlie.class), "beans.xml");
JavaArchive nonBda = ShrinkWrap.create(JavaArchive.class).addClasses(MarkerObtainer4.class);
return war.addAsLibraries(bda1, bda2, nonBda);
}
use of org.jboss.shrinkwrap.impl.BeansXml in project core by weld.
the class DecoratorDiscoveryTest method createTestArchive.
@Deployment
public static WebArchive createTestArchive() {
WebArchive testArchive = Deployments.baseDeployment().addClass(DecoratorDiscoveryTest.class);
JavaArchive archive01 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.ALL).decorators(ClassicDecorator.class), "beans.xml").addClasses(Dog.class, Cat.class);
JavaArchive archive02 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.ANNOTATED).decorators(ClassicDecorator.class), "beans.xml").addClasses(Plant.class, Tree.class, ClassicDecorator.class);
JavaArchive archive03 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.NONE).decorators(ClassicDecorator.class), "beans.xml").addClasses(Flat.class, House.class);
testArchive.addAsLibraries(archive01, archive02, archive03);
return testArchive;
}
use of org.jboss.shrinkwrap.impl.BeansXml in project core by weld.
the class BeanDiscoveryInjectionTest method createTestArchive.
@Deployment
public static WebArchive createTestArchive() {
WebArchive testArchive = Deployments.baseDeployment().addClass(BeanDiscoveryInjectionTest.class);
JavaArchive archive01 = ShrinkWrap.create(JavaArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.ALL), "beans.xml").addClasses(Dog.class, Cat.class, Cow.class);
JavaArchive archive02 = ShrinkWrap.create(JavaArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.ANNOTATED), "beans.xml").addClasses(Plant.class, Tree.class, Stone.class);
JavaArchive archive03 = ShrinkWrap.create(JavaArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.NONE), "beans.xml").addClasses(Flat.class, House.class);
testArchive.addAsLibraries(archive01, archive02, archive03);
return testArchive;
}
use of org.jboss.shrinkwrap.impl.BeansXml in project core by weld.
the class DuplicateBeansXmlMergingTest method createTestArchive.
@Deployment
public static WebArchive createTestArchive() {
BeansXml beansXml = new BeansXml();
beansXml.interceptors(SimpleInterceptor.class);
WebArchive war = baseDeployment(beansXml).addClasses(DuplicateBeansXmlMergingTest.class, SimpleBinding.class, SimpleInterceptor.class);
JavaArchive library = ShrinkWrap.create(JavaArchive.class, "library.jar").addAsManifestResource(beansXml, "beans.xml");
war.addAsLibrary(library);
return war;
}
use of org.jboss.shrinkwrap.impl.BeansXml in project core by weld.
the class BeanDiscoveryDecoratorTest method getDeployment.
@Deployment
public static Archive<?> getDeployment() {
WeldSEClassPath archives = ShrinkWrap.create(WeldSEClassPath.class);
JavaArchive archive01 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.ALL).decorators(ClassicRepresentDecorator.class, ScopedRepresentDecorator.class), "beans.xml").addClasses(Dog.class, Cat.class, ClassicRepresentDecorator.class, ScopedRepresentDecorator.class);
JavaArchive archive02 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.ANNOTATED).decorators(ClassicRepresentDecorator.class, ScopedRepresentDecorator.class), "beans.xml").addClasses(Plant.class, Tree.class, Stone.class);
JavaArchive archive03 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.NONE).decorators(ClassicRepresentDecorator.class, ScopedRepresentDecorator.class), "beans.xml").addClasses(Flat.class, House.class);
archives.add(archive01);
archives.add(archive02);
archives.add(archive03);
return archives;
}
Aggregations