Package org.jboss.shrinkwrap.api.spec

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


        final Properties properties = new Properties();
        properties.putAll(System.getProperties());
        if(properties.containsKey("node0")) {
            properties.put("node0", NetworkUtils.formatPossibleIpv6Address((String) properties.get("node0")));
        }
        war.addAsWebInfResource(new StringAsset(PropertiesValueResolver.replaceProperties(wsdl, properties)), "wsdl/TestService.wsdl");

        log.info(war.toString(true));

        EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "ws-serviceref-example.ear")
            .addAsModule(jar)
View Full Code Here


        ClassLoader tccl = Thread.currentThread().getContextClassLoader();
        String resourcesLocation = "org/jboss/as/test/integration/web/formauth/resources/";

        WebArchive war = ShrinkWrap.create(WebArchive.class, "form-auth.war");
        war.setWebXML(tccl.getResource(resourcesLocation + "web.xml"));
        war.addAsWebInfResource(tccl.getResource(resourcesLocation + "jboss-web.xml"), "jboss-web.xml");

        war.addClass(SecureServlet.class);
        war.addClass(SecuredPostServlet.class);
        war.addClass(LogoutServlet.class);
View Full Code Here

      log.info("start" + DEP1 + "deployment");

      WebArchive war = ShrinkWrap.create(WebArchive.class, DEP1 + ".war");
      war.addClass(PrincipalPrintingServlet.class);
      war.setWebXML(Utils.getResource("loginmodules/deployments/IdentityLoginModule/web.xml"));
      war.addAsWebInfResource(Utils.getResource("loginmodules/deployments/IdentityLoginModule/dep1/jboss-web.xml"),"jboss-web.xml");
      log.debug(war.toString(true));
      return war;
   }

   private static final String DEP2 = "IdentityLoginModule-customPrincipal";
View Full Code Here

      log.info("start" + DEP2 + "deployment");

      WebArchive war = ShrinkWrap.create(WebArchive.class, DEP2 + ".war");
      war.addClass(PrincipalPrintingServlet.class);
      war.setWebXML(Utils.getResource("loginmodules/deployments/IdentityLoginModule/web.xml"));
      war.addAsWebInfResource(Utils.getResource("loginmodules/deployments/IdentityLoginModule/dep2/jboss-web.xml"), "jboss-web.xml");
      log.debug(war.toString(true));

      return war;
   }
View Full Code Here

    @Deployment(name = "webservice-app-with-xerces", testable = false)
    public static WebArchive createWebServiceDeployment() {
        final WebArchive war = ShrinkWrap.create(WebArchive.class, WEBSERVICE_WEB_APP_CONTEXT + ".war");
        war.addClasses(XercesUsageWebService.class, XercesUsageWSEndpoint.class);
        // add a web.xml containing the webservice mapping as a servlet
        war.addAsWebInfResource("xerces/xerces-webservice-web.xml", "web.xml");
        // add a dummy xml to parse
        war.addAsResource("xerces/dummy.xml", "dummy.xml");

        // add the xerces jar in the .war/WEB-INF/lib
        war.addAsLibrary("xerces/xercesImpl.jar", "xercesImpl.jar");
View Full Code Here

    @Deployment
    public static WebArchive deployment() {
        WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxr-connection-test.war");
        archive.addClasses(JaxrServlet.class);
        archive.addAsWebInfResource("jaxr/webA.xml", "web.xml");
        archive.addAsWebInfResource("jaxr/jboss-webA.xml", "jboss-web.xml");
        return archive;
    }

    @Test
View Full Code Here

    @Deployment
    public static WebArchive deployment() {
        WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxr-connection-test.war");
        archive.addClasses(JaxrServlet.class);
        archive.addAsWebInfResource("jaxr/webA.xml", "web.xml");
        archive.addAsWebInfResource("jaxr/jboss-webA.xml", "jboss-web.xml");
        return archive;
    }

    @Test
    public void testConnectionFactoryLookup() throws Exception {
View Full Code Here

    @Deployment(name = "secured-servlet", managed = false)
    public static Archive<?> getDeployment2() {
        WebArchive war = ShrinkWrap.create(WebArchive.class, "SecurityDomainTestCase.war");
        war.addClass(SecuredServlet.class);
        war.addAsWebInfResource(new StringAsset("<jboss-web><security-domain>test</security-domain></jboss-web>"), "jboss-web.xml");
        war.addAsWebInfResource(new StringAsset(
                "<web-app version=\"2.5\"><login-config><auth-method>BASIC</auth-method></login-config></web-app>"), "web.xml");
        return war;
    }
View Full Code Here

    @Deployment(name = "secured-servlet", managed = false)
    public static Archive<?> getDeployment2() {
        WebArchive war = ShrinkWrap.create(WebArchive.class, "SecurityDomainTestCase.war");
        war.addClass(SecuredServlet.class);
        war.addAsWebInfResource(new StringAsset("<jboss-web><security-domain>test</security-domain></jboss-web>"), "jboss-web.xml");
        war.addAsWebInfResource(new StringAsset(
                "<web-app version=\"2.5\"><login-config><auth-method>BASIC</auth-method></login-config></web-app>"), "web.xml");
        return war;
    }

    @Test
View Full Code Here

    }

    private Archive<?> getWebArchive() {
        WebArchive archive = ShrinkWrap.create(WebArchive.class, "deployment-web.war");
        archive.addClasses(SampleServlet.class);
        archive.addAsWebInfResource(DeploymentTestCase.class.getPackage(), "web.xml", "web.xml");
        return archive;
    }

    private Archive<?> getEjbArchive() {
        JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "deployment-ejb.jar");
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.