Examples of addAsWebInfResource()


Examples of org.jboss.shrinkwrap.api.spec.WebArchive.addAsWebInfResource()

                  "/WEB-INF/classes/META-INF/services/javax.el.ExpressionFactory");

         /*
         * Set up container configuration
         */
         archive.addAsWebInfResource("jetty-env.xml", "jetty-env.xml");
         archive.addAsWebInfResource("jetty-log4j.xml", "log4j.xml");

      }

      // Tomcat specific stuff
View Full Code Here

Examples of org.jboss.shrinkwrap.api.spec.WebArchive.addAsWebInfResource()

         /*
         * Set up container configuration
         */
         archive.addAsWebInfResource("jetty-env.xml", "jetty-env.xml");
         archive.addAsWebInfResource("jetty-log4j.xml", "log4j.xml");

      }

      // Tomcat specific stuff
      if (isTomcat()) {
View Full Code Here

Examples of org.jboss.shrinkwrap.api.spec.WebArchive.addAsWebInfResource()

        // add war that contains its own pu
        WebArchive war = ShrinkWrap.create(WebArchive.class, ARCHIVE_NAME + ".war");
        war.addClasses(SimpleServlet.class, WebLink.class);
        war.addAsResource(new StringAsset(web_persistence_xml), "META-INF/persistence.xml");

        war.addAsWebInfResource(
                new StringAsset("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
                        "\n" +
                        "<web-app version=\"3.0\"\n" +
                        "         xmlns=\"http://java.sun.com/xml/ns/javaee\"\n" +
                        "         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" +
View Full Code Here

Examples of org.jboss.shrinkwrap.api.spec.WebArchive.addAsWebInfResource()

        // add war that contains its own pu
        WebArchive war = ShrinkWrap.create(WebArchive.class, ARCHIVE_NAME + ".war");
        war.addClasses(SimpleServlet.class, WebLink.class);
        war.addAsResource(new StringAsset(web_persistence_xml), "META-INF/persistence.xml");

        war.addAsWebInfResource(
                new StringAsset("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
                        "\n" +
                        "<web-app version=\"3.0\"\n" +
                        "         xmlns=\"http://java.sun.com/xml/ns/javaee\"\n" +
                        "         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" +
View Full Code Here

Examples of org.jboss.shrinkwrap.api.spec.WebArchive.addAsWebInfResource()

    private static WebArchive createDeployment() {
        WebArchive war = ShrinkWrap.create(WebArchive.class, "stateful.war");
        war.addPackage(StatefulBean.class.getPackage());
        war.addPackage(EJBDirectory.class.getPackage());
        war.setWebXML(StatefulBean.class.getPackage(), "web.xml");
        war.addAsWebInfResource(new StringAsset("<beans>" +
                "<interceptors><class>" + StatefulCDIInterceptor.class.getName() + "</class></interceptors>" +
                "<decorators><class>" + CounterDecorator.class.getName() + "</class></decorators>" +
                "</beans>"), "beans.xml");
        System.out.println(war.toString(true));
        return war;
View Full Code Here

Examples of org.jboss.shrinkwrap.api.spec.WebArchive.addAsWebInfResource()

    public static Archive<?> deployment0() {
        WebArchive war = ShrinkWrap.create(WebArchive.class, "distributable.war");
        war.addClass(SimpleServlet.class);
        // Take web.xml from the managed test.
        war.setWebXML(ClusteredWebAbstractCase.class.getPackage(), "web.xml");
        war.addAsWebInfResource(ClusteredWebAbstractCase.class.getPackage(), "jboss-web.xml", "jboss-web.xml");
        System.out.println(war.toString(true));
        return war;
    }

    @Deployment(name = DEPLOYMENT_2, managed = false, testable = false)
View Full Code Here

Examples of org.jboss.shrinkwrap.api.spec.WebArchive.addAsWebInfResource()

    @TargetsContainer(CONTAINER_2)
    public static Archive<?> deployment1() {
        WebArchive war = ShrinkWrap.create(WebArchive.class, "distributable.war");
        war.addClass(SimpleServlet.class);
        war.setWebXML(ClusteredWebAbstractCase.class.getPackage(), "web.xml");
        war.addAsWebInfResource(ClusteredWebAbstractCase.class.getPackage(), "jboss-web.xml", "jboss-web.xml");
        System.out.println(war.toString(true));
        return war;
    }

}
View Full Code Here

Examples of org.jboss.shrinkwrap.api.spec.WebArchive.addAsWebInfResource()

    private static Archive<?> createDeployment() {
        WebArchive war = ShrinkWrap.create(WebArchive.class, "distributable.war");
        war.addClasses(Game.class, Generator.class, MaxNumber.class, Random.class);
        war.setWebXML(ClusteredWebAbstractCase.class.getPackage(), "web.xml");
        war.addAsWebResource(JSFFailoverTestCase.class.getPackage(), "home.xhtml", "home.xhtml");
        war.addAsWebInfResource(JSFFailoverTestCase.class.getPackage(), "faces-config.xml", "faces-config.xml");
        war.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
        return war;
    }

    /**
 
View Full Code Here

Examples of org.jboss.shrinkwrap.api.spec.WebArchive.addAsWebInfResource()

        WebArchive war = ShrinkWrap.create(WebArchive.class, "distributable.war");
        war.addClasses(Game.class, Generator.class, MaxNumber.class, Random.class);
        war.setWebXML(ClusteredWebAbstractCase.class.getPackage(), "web.xml");
        war.addAsWebResource(JSFFailoverTestCase.class.getPackage(), "home.xhtml", "home.xhtml");
        war.addAsWebInfResource(JSFFailoverTestCase.class.getPackage(), "faces-config.xml", "faces-config.xml");
        war.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
        return war;
    }

    /**
     * Parses the response page and headers for a cookie, JSF view state and the numberguess game status.
View Full Code Here

Examples of org.jboss.shrinkwrap.api.spec.WebArchive.addAsWebInfResource()

    }

    private static File getBrokenWar() {
        WebArchive war = ShrinkWrap.create(WebArchive.class, "malformedDeployment.war");
        war.addClass(SimpleServlet.class);
        war.addAsWebInfResource(new StringAsset("Malformed"), "web.xml");
        File brokenWar = new File(System.getProperty("java.io.tmpdir") + File.separator + "malformedDeployment.war");
        brokenWar.deleteOnExit();
        new ZipExporterImpl(war).exportTo(brokenWar, true);
        return brokenWar;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.