Package org.jboss.shrinkwrap.api

Examples of org.jboss.shrinkwrap.api.ArchivePath


        return ArchiveHelper.isEarArchive(archive) && isTopLevelNode(node) && node.getAsset() instanceof ArchiveAsset;
    }

    public static boolean isTopLevelNode(Node node)
    {
        final ArchivePath parent = node.getPath().getParent();
        return parent == null || "/".equals(parent.get());
    }
View Full Code Here


          //if (!archive.contains(webXmlPath))
          //{
          //   // sets the module name to "test"
          //   ((WebArchive) archive).setWebXML("org/jboss/arquillian/container/glassfish/remote_3/web.xml");
          //}
          ArchivePath sunWebXmlPath = ArchivePaths.create("/WEB-INF/sun-web.xml");
          if (!archive.contains(sunWebXmlPath))
          {
             // sets the module name to "test"
             WebArchive.class.cast(archive).addWebResource("org/jboss/arquillian/container/glassfish/remote_3/sun-web.xml", "sun-web.xml");
          }
View Full Code Here

  }

  public static WebArchive createDeployment(String packageName) throws IOException {
    WebArchive war = createPortletDeployment(packageName);
    Node node = war.get("WEB-INF/portlet.xml");
    ArchivePath path = node.getPath();
    String s = Tools.read(node.getAsset().openStream(), Tools.UTF_8);
    s = s.replace("<portlet-info>", "<resource-bundle>bundle</resource-bundle>" + "<portlet-info>");
    war.delete(path);
    war.add(new StringAsset(s), path);
    war.addAsResource(new StringAsset("abc=def"), "bundle_fr_FR.properties");
View Full Code Here

  }

  public static WebArchive createDeployment(String packageName) throws IOException {
    WebArchive war = createServletDeployment(true, packageName);
    Node node = war.get("/WEB-INF/web.xml");
    ArchivePath path = node.getPath();
    String s = Tools.read(node.getAsset().openStream(), Tools.UTF_8);
    s = s.replace("<async-supported>true</async-supported>",
        "<init-param><param-name>juzu.resource_bundle</param-name><param-value>bundle</param-value></init-param>" +
            "<async-supported>true</async-supported>");
    war.delete(path);
View Full Code Here

        */
        log.debugf("Add dependencies: %s", moduleDeps);
        attributes.putValue("Dependencies", moduleDeps.toString());

        // Add the manifest to the archive
        ArchivePath manifestPath = ArchivePaths.create(JarFile.MANIFEST_NAME);
        appArchive.delete(manifestPath);
        appArchive.add(new Asset() {
                    public InputStream openStream() {
                        try {
                            ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

        log.debugf("Process archive '%s' with: %s", appArchive.getName(), archiveProcessor);
        archiveProcessor.process(appArchive, testClass);

        // Debug the application archive manifest
        ArchivePath manifestPath = ArchivePaths.create(JarFile.MANIFEST_NAME);
        Node node = appArchive.get(manifestPath);
        if (node == null) {
            log.errorf("Cannot find manifest in: %s", appArchive.getName());
        } else {
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

        log.debugf("Process archive '%s' with: %s", appArchive.getName(), archiveProcessor);
        archiveProcessor.process(appArchive, testClass);

        // Debug the application archive manifest
        ArchivePath manifestPath = ArchivePaths.create(JarFile.MANIFEST_NAME);
        Node node = appArchive.get(manifestPath);
        if (node == null) {
            log.errorf("Cannot find manifest in: %s", appArchive.getName());
        } else {
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

        log.debugf("Add dependencies: %s", moduleDeps);
        attributes.putValue("Dependencies", moduleDeps.toString());

        // Add the manifest to the archive
        ArchivePath manifestPath = ArchivePaths.create(JarFile.MANIFEST_NAME);
        appArchive.delete(manifestPath);
        appArchive.add(new Asset() {
                    public InputStream openStream() {
                        try {
                            ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

        log.debugf("Add dependencies: %s", moduleDeps);
        attributes.putValue("Dependencies", moduleDeps.toString());

        // Add the manifest to the archive
        ArchivePath manifestPath = ArchivePaths.create(JarFile.MANIFEST_NAME);
        appArchive.delete(manifestPath);
        appArchive.add(new Asset() {
            public InputStream openStream() {
                try {
                    ByteArrayOutputStream baos = new ByteArrayOutputStream();
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

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.