Package org.jboss.shrinkwrap.api.spec

Examples of org.jboss.shrinkwrap.api.spec.WebArchive


   }

   public void testWarWithLibWithoutXmlInEar() throws Exception
   {
      EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "warinear.ear");
      WebArchive war = createWarWithLib(true, false);
      ear.addModule(war);
      MockArchiveManifest.addManifest(ear);
      unit = assertDeploy(ear);
     
      E environment = assertSingleEnvironment("warinear.ear/" + WAR_NAME);
View Full Code Here


   }

   public void testWarWithoutXmlWithLibWithoutXmlInEar() throws Exception
   {
      EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "warinear.ear");
      WebArchive war = createWarWithLib(false, false);
      ear.addModule(war);
      MockArchiveManifest.addManifest(ear);
      unit = assertDeploy(ear);
     
      assertEmptyEnvironment();
View Full Code Here

   }

   public void testWarWithoutXmlWithLibInEar() throws Exception
   {
      EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "warinear.ear");
      WebArchive war = createWarWithLib(false, true);
      ear.addModule(war);
      MockArchiveManifest.addManifest(ear);
      unit = assertDeploy(ear);
     
      E environment = assertSingleEnvironment("warinear.ear/" + WAR_NAME);
View Full Code Here

      createLib(ear, "ext.jar", true, ExternalWebBean.class);
      JavaArchive ejbJar = createEjbJar("simple.jar", true, PlainJavaBean.class);
      ear.addModule(ejbJar);
      ejbJar = createEjbJar("ejbs.jar", true, MySLSBean.class, BusinessInterface.class);
      ear.addModule(ejbJar);
      WebArchive war = createWar("simple.war", true, ServletWebBean.class);
      createLib(war, "ui.jar", true, UIWebBean.class);
      ear.addModule(war);
      war = createWar("crm.war", true, NotWBJsfBean.class);
      createLib(war, "crm.jar", true, CrmWebBean.class);
      ear.addModule(war);
View Full Code Here

      createLib(ear, "ext.jar", false, ExternalWebBean.class);
      JavaArchive ejbJar = createEjbJar("simple.jar", false, PlainJavaBean.class);
      ear.addModule(ejbJar);
      ejbJar = createEjbJar("ejbs.jar", false, MySLSBean.class, BusinessInterface.class);
      ear.addModule(ejbJar);
      WebArchive war = createWar("simple.war", false, ServletWebBean.class);
      createLib(war, "ui.jar", false, UIWebBean.class);
      ear.addModule(war);
      war = createWar("crm.war", false, NotWBJsfBean.class);
      createLib(war, "crm.jar", false, CrmWebBean.class);
      ear.addModule(war);
View Full Code Here

      // Make a deployment
      final String appName = "testServletJsp";
      final String name = appName + ".war";
      final Class<?> servletClass = JspForwardingServlet.class;
      final WebArchive archive = ShrinkWrap.create(WebArchive.class, name);
      final ArchivePath targetPathWebXml = ArchivePaths.create("web.xml");
      archive.addWebResource(PATH_ACTUAL_SERVLET_FORWARDING_TO_JSP_WEB_XML, targetPathWebXml).addResource(PATH_JSP)
            .addClass(servletClass);
      log.info(archive.toString(true));

      // Deploy
      server.deploy(archive);

      try
View Full Code Here

      // Make a deployment
      final String appName = "embeddedEjbCallingServlet";
      final String name = appName + ".war";
      final Class<?> servletClass = EmbeddedEjbCallingServlet.class;
      final WebArchive archive = ShrinkWrap.create(WebArchive.class, name);
      final ArchivePath targetPathWebXml = ArchivePaths.create("web.xml");
      archive.addWebResource(PATH_ACTUAL_SERVLET_EMBEDDED_EJB_WEB_XML, targetPathWebXml).addClass(servletClass);
      log.info(archive.toString(true));

      // Deploy
      server.deploy(archive);

      try
View Full Code Here

   {

      // Make a deployment
      final String appName = "webservice";
      final String name = appName + ".war";
      final WebArchive archive = ShrinkWrap.create(WebArchive.class, name);
      final String targetPathWebXml = "web.xml";
      archive.addWebResource(PATH_ACTUAL_WEB_XML_WS, targetPathWebXml).addClass(
            org.jboss.jbossas.embedded.testsuite.ws.EmbeddedWs.class);
      // Deploy
      log.info(archive.toString(true));
      server.deploy(archive);
      try
      {
         // consume the webservice
         org.jboss.jbossas.embedded.testsuite.wsclient.Embedded embeddedService = new org.jboss.jbossas.embedded.testsuite.wsclient.Embedded();
View Full Code Here

      assertNoBeansXml(bda1);
   }
  
   public void testWars() throws Exception
   {
      WebArchive war1 = createWar("simple1.war", true, ServletWebBean.class);
      DeploymentUnit unit = assertDeploy(war1);
      Class<?> servletWebBeanClass = getClass(ServletWebBean.class, unit);
      Deployment deployment1 = initializeDeploymentBean(unit);

      WebArchive war2 = createWar("simple2.war", true, NotWBJsfBean.class);
      unit = assertDeploy(war2);
      Class<?> notWBJsfBeanClass = getClass(NotWBJsfBean.class, unit);
      Deployment deployment2 = initializeDeploymentBean(unit);

      // assertion deleted as loadBDA implementation does not check for unreachable classes anymore
View Full Code Here

      assertExpectedClasses(bda2, NotWBJsfBean.class);
   }
  
   public void testMixedWars() throws Exception
   {
      WebArchive war1 = createWar("simple1.war", true, ServletWebBean.class);
      /*DeploymentUnit unit = */assertDeploy(war1);
      //Deployment deployment1 = initializeDeploymentBean(unit));

      WebArchive war2 = createWar("simple2.war", false, NotWBJsfBean.class);
      /*unit = */assertDeploy(war2);
     
      // assertion deleted as loadBDA implementation does not check for unreachable classes anymore
      // Class<?> notWBJsfBeanClass = getClass(NotWBJsfBean.class, unit);
      // assertCannotLoadBDA(deployment1, notWBJsfBeanClass);
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.api.spec.WebArchive

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.