Package org.jboss.shrinkwrap.api

Examples of org.jboss.shrinkwrap.api.ArchivePath


      // 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
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);
View Full Code Here

      log.info("testJmsAndMdb");

      // Create a virtual archive for the MDB deployment
      final String name = "jms-mdb-test.jar";
      final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, name);
      final ArchivePath queuesTargetPath = ArchivePaths.create(FILENAME_QUEUE_SERVICE_XML);
      archive.addClass(MessageStoringMdb.class).addResource(PATH_QUEUE_SERVICE_XML, queuesTargetPath);

      // Deploy
      log.info(archive.toString(true));
      server.deploy(archive);
View Full Code Here

      // Log
      log.info("testDataSourceAndEntity");

      // Create a virtual archive for DS, persistence.xml, Entity, and SLSB
      final String name = "datasource-entity-test.jar";
      final ArchivePath targetDsPath = ArchivePaths.create(FILENAME_EMBEDDED_DS);
      final ArchivePath targetPersistencePath = ArchivePaths.create(PATH_DESTINATION_PERSISTENCE_XML);
      final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, name);
      archive.addClasses(Jbossian.class, JbossianRegistrarLocalBusiness.class, JbossianRegistrarBean.class)
            .addResource(PATH_RESOURCE_DS_XML_EMBEDDED, targetDsPath)
            .addManifestResource(PATH_RESOURCE_PERSISTENCE_XML_EMBEDDED, targetPersistencePath);
View Full Code Here

        public Deployment(String archiveName, Package pkg, boolean show) {
            this.archiveName = archiveName;
            this.pkg = pkg;

            ArchivePath metaInf = ArchivePaths.create("META-INF");

            archive = ShrinkWrap.create(JavaArchive.class, archiveName);
            archive.addPackage(pkg);

            File sourceMetaInf = getSourceMetaInfDir();
View Full Code Here

    private class Deployment extends AbstractDeployment {
        final File realArchive;

        public Deployment(String archiveName, Package[] pkgs, boolean show) {

            ArchivePath metaInf = ArchivePaths.create("META-INF");

            JavaArchive archive = ShrinkWrap.create(JavaArchive.class, archiveName);
            for(Package pkg : pkgs) {
                archive.addPackage(pkg);
            }
View Full Code Here

    private class WarDeployment extends AbstractDeployment {
        final File realArchive;

        public WarDeployment(String archiveName, Package[] pkgs, boolean show) {

            ArchivePath metaInf = ArchivePaths.create("META-INF");


            WebArchive archive = ShrinkWrap.create(WebArchive.class, archiveName);
            for(Package pkg : pkgs) {
                archive.addPackage(pkg);
View Full Code Here

    private class ArbitraryDeployment extends AbstractDeployment {
        final File realArchive;

        public ArbitraryDeployment(Archive archive,  boolean show) {

            ArchivePath metaInf = ArchivePaths.create("META-INF");

            System.out.println(archive.toString(show));
            realArchive = createArchive(archive);
        }
View Full Code Here

                    // Actually the performace loss is caused by inner classes
                    // handling - which is not necessary here
                    // See also
                    // org.jboss.shrinkwrap.impl.base.container.ContainerBase
                    // addPackage() and getClassesPath() methods
                    ArchivePath classesPath = resolveClassesPath(archive);

                    if (classesPath != null) {
                        ArchivePath classNamePath = AssetUtil.getFullPathForClassResource(className);
                        archive.add(new ClassLoaderAsset(classNamePath.get().substring(1), clToUse),
                                ArchivePaths.create(classesPath, classNamePath));
                    } else {
                        archive.addClass(className);
                    }
                }
View Full Code Here

                if (classesPackage == null) {
                    classesPackage = clazz.getPackage();
                }
                Asset resource = new ClassAsset(clazz);
                ArchivePath location = ArchivePaths.create(resolveClassesPath(archive),
                        AssetUtil.getFullPathForClassResource(clazz));
                archive.add(resource, location);
            }

            // Quite naive way of handling inner classes
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.api.ArchivePath

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.