Package org.jboss.shrinkwrap.api.spec

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


            } else {
                log.info(String.format("Found %s module in web archive %s", module, war.getName()));
            }

            WebArchive copy = ShrinkWrap.create(WebArchive.class, war.getName());
            copy.merge(war);
            copy.addAsLibraries(libs);
            export(copy, root);
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }
View Full Code Here


            } else {
                log.info(String.format("Found %s module in web archive %s", module, war.getName()));
            }

            WebArchive copy = ShrinkWrap.create(WebArchive.class, war.getName());
            copy.merge(war);
            copy.addAsLibraries(libs);
            export(copy, root);
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }
View Full Code Here

                                   .addClasses(Movie.class, MoviesBean.class, MoviesArquillianHtmlUnitTest.class, ActionServlet.class)
                                   .addAsResource(new ClassLoaderAsset("META-INF/ejb-jar.xml"), "META-INF/ejb-jar.xml")
                                   .addAsResource(new ClassLoaderAsset("META-INF/persistence.xml"), "META-INF/persistence.xml")
                                   .addAsLibraries(libs);

        war.merge(ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class)
                            .importDirectory(Basedir.basedir(WEBAPP_SRC)).as(GenericArchive.class),
                  "/", Filters.includeAll());

        return war;
    }
View Full Code Here

    }

    protected void merge(MultiContext context, WebArchive war) throws Exception {
        WebArchive uber = context.getWar();
        Filter<ArchivePath> filter = createFilter(uber, war);
        uber.merge(war, filter);
    }

    protected WebArchive readWebArchive(Class<?> clazz) throws Exception {
        return readWebArchive(clazz, clazz);
    }
View Full Code Here

                .addClasses(Movie.class, MoviesBean.class, MoviesArquillianHtmlUnitTest.class, ActionServlet.class)
                .addAsResource(new ClassLoaderAsset("META-INF/ejb-jar.xml"), "META-INF/ejb-jar.xml")
                .addAsResource(new ClassLoaderAsset("META-INF/persistence.xml"), "META-INF/persistence.xml")
                .addAsLibraries(libs);

        war.merge(ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class)
                .importDirectory(WEBAPP_SRC).as(GenericArchive.class),
                "/", Filters.includeAll());

        return war;
    }
View Full Code Here

    return extCL;
  }

  private File explode(File targetDir, JavaArchive classes, JavaArchive lib) {
    WebArchive archive = ShrinkWrap.create(WebArchive.class);
    archive.merge(classes, "WEB-INF/classes");
    archive.addAsDirectory("WEB-INF/lib");
    File explodedDir = archive.as(ExplodedExporter.class).exportExploded(targetDir);
    File libJar = new File(explodedDir, "WEB-INF/lib/lib.jar");
    lib.as(ZipExporter.class).exportTo(libJar);
    return explodedDir;
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.