Examples of ArchivePath


Examples of org.jboss.shrinkwrap.api.ArchivePath

   private Archive<?> handleArchive(EnterpriseArchive applicationArchive, Collection<Archive<?>> auxiliaryArchives, WebArchive protocol, Processor processor, TestDeployment testDeployment)
   {
      Map<ArchivePath, Node> applicationArchiveWars = applicationArchive.getContent(Filters.include(".*\\.war"));
      if(applicationArchiveWars.size() == 1)
      {
         ArchivePath warPath = applicationArchiveWars.keySet().iterator().next();
         try
         {
            handleArchive(
                  applicationArchive.getAsType(WebArchive.class, warPath),
                  new ArrayList<Archive<?>>(), // reuse the War handling, but Auxiliary Archives should be added to the EAR, not the WAR
View Full Code Here

Examples of org.jboss.shrinkwrap.api.ArchivePath

            }
         });

         for (Entry<ArchivePath, Node> entry : content.entrySet())
         {
            ArchivePath path = entry.getKey();
            File target = new File(baseDir.getAbsolutePath() + "/" + path.get().replaceFirst("/lib/", ""));
            target.mkdirs();
            target.delete();
            target.createNewFile();

            Node node = entry.getValue();
View Full Code Here

Examples of org.jboss.shrinkwrap.api.ArchivePath

        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

Examples of org.jboss.shrinkwrap.api.ArchivePath

    @ContainerResource
    private ManagementClient managementClient;

    private Archive<?> createArchive() {
        ArchivePath path = ArchivePaths.create("/");
        path = ArchivePaths.create(path, "services");
        path = ArchivePaths.create(path, Extension.class.getName());
        JavaArchive jar = ShrinkWrap.create(JavaArchive.class, JAR_NAME);
        jar.addClass(TestExtension.class);
        jar.addAsManifestResource(ExtensionRemoveTestCase.class.getPackage(), Extension.class.getName(), path);
View Full Code Here

Examples of org.jboss.shrinkwrap.api.ArchivePath

        return super.findResources(name);
    }

    private Node findNode(final String name)
    {
        ArchivePath path = ArchivePaths.create(path(prefix, name));
        Node node = archive.get(path);
        if (node == null)
        {
            path = ArchivePaths.create(name);
            node = archive.get(path);
View Full Code Here

Examples of org.jboss.shrinkwrap.api.ArchivePath

                }

                @Override
                public InputStream getInputStream() throws IOException
                {
                    final ArchivePath path = convertToArchivePath(u);
                    Node node = archive.get(prefix + path.get());
                    if (node == null && !prefix.isEmpty())
                    { // WEB-INF/lib/x.jar!*
                        node = archive.get(path);
                    }

View Full Code Here

Examples of org.jboss.shrinkwrap.api.ArchivePath

            merge(appArchive, auxArchives);
        } else {
            // JBAS-9059 Inconvertible types error due to OpenJDK compiler bug
            //if (appArchive instanceof WebArchive) {
            if (WebArchive.class.isAssignableFrom(appArchive.getClass())) {
                final ArchivePath webInfLib = ArchivePaths.create("WEB-INF", "lib");
                for (Archive<?> aux : auxArchives) {
                    // we don't want to include the arquillian-core.jar and arquillian-junit.jar
                    // auxillary archives, as these are already part of the container
                    if (!excludedAuxillaryArchives.contains(aux.getName())) {
                        appArchive.add(aux, webInfLib);
View Full Code Here

Examples of org.jboss.shrinkwrap.api.ArchivePath

            }
        }
        attributes.putValue("Dependencies", moduleDeps.toString());

        // Add the manifest to the archive
        ArchivePath path = ArchivePaths.create("META-INF", "MANIFEST.MF");
        appArchive.add(new Asset() {
                public InputStream openStream() {
                    try {
                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
                        manifest.write(baos);
View Full Code Here

Examples of org.jboss.shrinkwrap.api.ArchivePath

   private Archive<?> handleArchive(EnterpriseArchive applicationArchive, Collection<Archive<?>> auxiliaryArchives, JavaArchive protocol, Processor processor, TestDeployment testDeployment)
   {
      Map<ArchivePath, Node> applicationArchiveWars = applicationArchive.getContent(Filters.include(".*\\.war"));
      if(applicationArchiveWars.size() == 1)
      {
         ArchivePath warPath = applicationArchiveWars.keySet().iterator().next();
         try
         {
            handleArchive(
                  applicationArchive.getAsType(WebArchive.class, warPath),
                  new ArrayList<Archive<?>>(), // reuse the War handling, but Auxiliary Archives should be added to the EAR, not the WAR
View Full Code Here

Examples of org.jboss.shrinkwrap.api.ArchivePath

        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
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.