Package org.jboss.shrinkwrap.impl

Examples of org.jboss.shrinkwrap.impl.BeansXml$Exclude$IfClassNotAvailable


    public static WebArchive baseTestArchive() {

        WebArchive testArchive = Deployments.baseDeployment().addClass(InterceptorDiscoveryTestBase.class);

        JavaArchive archive01 = ShrinkWrap.create(BeanArchive.class)
                .addAsManifestResource(new BeansXml(BeanDiscoveryMode.ALL).interceptors(ClassicInterceptor.class), "beans.xml")
                .addClasses(Dog.class, Cat.class, InterceptorBindingAnnotation.class);
        JavaArchive archive02 = ShrinkWrap.create(BeanArchive.class)
                .addAsManifestResource(new BeansXml(BeanDiscoveryMode.ANNOTATED).interceptors(ClassicInterceptor.class), "beans.xml")
                .addClasses(Plant.class, Tree.class, Stone.class, ClassicInterceptor.class);
        JavaArchive archive03 = ShrinkWrap.create(BeanArchive.class)
                .addAsManifestResource(new BeansXml(BeanDiscoveryMode.NONE).interceptors(ClassicInterceptor.class), "beans.xml")
                .addClasses(Flat.class, House.class);
        testArchive.addAsLibraries(archive01, archive02, archive03);

        return testArchive;
    }
View Full Code Here


    public static WebArchive baseDeployment(BeansXml beansXml) {
        return baseDeployment(beansXml, DEFAULT_WEB_XML);
    }

    public static WebArchive baseDeployment() {
        return baseDeployment(new BeansXml(), DEFAULT_WEB_XML);
    }
View Full Code Here

    public static WebArchive baseDeployment() {
        return baseDeployment(new BeansXml(), DEFAULT_WEB_XML);
    }

    public static WebArchive baseDeployment(Asset webXml) {
        return baseDeployment(new BeansXml(), webXml);
    }
View Full Code Here

    protected static WebArchive baseTestArchive() {

        WebArchive testArchive = Deployments.baseDeployment().addClass(AlternativeDiscoveryTestBase.class);

        JavaArchive archive01 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.ALL).alternatives(AlternativeDog.class), "beans.xml")
                .addClasses(Dog.class, AlternativeDog.class, DogInterface.class, Cat.class);
        JavaArchive archive02 = ShrinkWrap.create(BeanArchive.class)
                .addAsManifestResource(new BeansXml(BeanDiscoveryMode.ANNOTATED).alternatives(AlternativeTree.class), "beans.xml")
                .addClasses(Tree.class, AlternativeTree.class, Plant.class, Stone.class, AlternativeStone.class);
        JavaArchive archive03 = ShrinkWrap.create(BeanArchive.class)
                .addAsManifestResource(new BeansXml(BeanDiscoveryMode.NONE).alternatives(AlternativeFlat.class), "beans.xml")
                .addClasses(Flat.class, AlternativeFlat.class);

        testArchive.addAsLibraries(archive01, archive02, archive03);
        return testArchive;
    }
View Full Code Here

public class BeanDiscoveryInjectionTestBase {

    protected static WebArchive baseTestArchive() {
        WebArchive testArchive = Deployments.baseDeployment().addClass(BeanDiscoveryInjectionTestBase.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;
    }
View Full Code Here

            .getBytes());
    protected static final Asset INCLUDED_WEB_XML = new ByteArrayAsset(extendDefaultWebXml(
            toServletAndMapping("Included Servlet", IncludedServlet.class, "/included") + toContextParam("WELD_CONTEXT_ID_KEY", SECOND)).getBytes());

    public static WebArchive createFirstTestArchive() {
         WebArchive war = ShrinkWrap.create(WebArchive.class,"app1.war").addAsWebInfResource(new BeansXml(), "beans.xml").setWebXML(FORWARDING_WEB_XML);
         war.addClass(ForwardingServlet.class);
         return war;
    }
View Full Code Here

         war.addClass(ForwardingServlet.class);
         return war;
    }

    public static WebArchive createSecondTestArchive() {
        WebArchive war = ShrinkWrap.create(WebArchive.class,"app2.war").addAsWebInfResource(new BeansXml(), "beans.xml").setWebXML(INCLUDED_WEB_XML);
        war.addClass(IncludedServlet.class);
        return war;
    }
View Full Code Here

import org.junit.Test;

public class StereotypeDiscoveryTestBase {

    public static WebArchive baseTestArchive() {
        return Deployments.baseDeployment(new BeansXml(BeanDiscoveryMode.ANNOTATED)).addPackage(StereotypeDiscoveryTestBase.class.getPackage());
    }
View Full Code Here

    public static WebArchive baseTestArchive() {

        WebArchive testArchive = Deployments.baseDeployment().addClass(DecoratorDiscoveryTestBase.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;
    }
View Full Code Here

    private static final Logger log = Logger.getLogger(LibrariesDiscoveredTestBase.class.getName());
    private static final String DELIMITER = "-------------------------";

    public static WebArchive deployment() {
        JavaArchive library = ShrinkWrap.create(JavaArchive.class, "library.jar").addClass(Camel.class).addAsManifestResource(new BeansXml(), "beans.xml");
        log.fine(DELIMITER);
        log.fine("Library");
        log.fine(DELIMITER);
        log.fine(library.toString(true));
        return baseDeployment().addClasses(Needle.class, LibrariesDiscoveredTestBase.class).addAsLibrary(library);
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.impl.BeansXml$Exclude$IfClassNotAvailable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.