Examples of closeArchiveEntry()


Examples of com.facebook.presto.hive.shaded.org.apache.commons.compress.archivers.jar.JarArchiveOutputStream.closeArchiveEntry()

        JarArchiveEntry jentry = new JarArchiveEntry(f.getName());
        FileInputStream fis = new FileInputStream(f);
        out.putArchiveEntry(jentry);
        IOUtils.copy(fis, out);
        fis.close();
        out.closeArchiveEntry();
      }
      out.finish();
    } catch (IOException e) {
      throw new CompileProcessorException("Exception while writing jar", e);
    } finally {
View Full Code Here

Examples of com.facebook.presto.hive.shaded.org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.closeArchiveEntry()

        try {
          IOUtils.copy(input, tOut); // copy with 8K buffer, not close
        } finally {
          input.close();
        }
        tOut.closeArchiveEntry();
      }
      tOut.close(); // finishes inside
    } finally {
      // TarArchiveOutputStream seemed not to close files properly in error situation
      org.apache.hadoop.io.IOUtils.closeStream(out);
View Full Code Here

Examples of org.apache.commons.compress.archivers.ArchiveOutputStream.closeArchiveEntry()

              entry.setMode(0100000);
              os.putArchiveEntry(entry);
              IOUtils.copy(new FileInputStream(file), os);
        }
      }
          os.closeArchiveEntry();
          os.close();
      manager.completeWorkItem(workItem.getId(), null);
    } catch (Throwable t) {
      t.printStackTrace();
      manager.abortWorkItem(workItem.getId());
View Full Code Here

Examples of org.apache.commons.compress.archivers.ArchiveOutputStream.closeArchiveEntry()

            try {
                out_zip = new FileOutputStream(to);
                os = new ArchiveStreamFactory().createArchiveOutputStream("zip", out_zip);
                os.putArchiveEntry(new ZipArchiveEntry(from.getName()));
                IOUtils.copy(new FileInputStream(from), os);
                os.closeArchiveEntry();
            } finally {
                if (os != null) {
                    os.close();
                }
            }
View Full Code Here

Examples of org.apache.commons.compress.archivers.ArchiveOutputStream.closeArchiveEntry()

            if ( "war".equals( project.getPackaging() ) )
            {

                os.putArchiveEntry( new JarArchiveEntry( StringUtils.removeStart( path, "/" ) + ".war" ) );
                IOUtils.copy( new FileInputStream( projectArtifact.getFile() ), os );
                os.closeArchiveEntry();

                properties.put( Tomcat7Runner.WARS_KEY, StringUtils.removeStart( path, "/" ) + ".war|" + path );
            }
            else if ( warRunDependencies != null && !warRunDependencies.isEmpty() )
            {
View Full Code Here

Examples of org.apache.commons.compress.archivers.ArchiveOutputStream.closeArchiveEntry()

                            warFileToBundle = addContextXmlToWar( warRunDependency.contextXml, warFileToBundle );
                        }
                        final String warFileName = artifact.getFile().getName();
                        os.putArchiveEntry( new JarArchiveEntry( warFileName ) );
                        IOUtils.copy( new FileInputStream( warFileToBundle ), os );
                        os.closeArchiveEntry();
                        String propertyWarValue = properties.getProperty( Tomcat7Runner.WARS_KEY );
                        String contextPath =
                            StringUtils.isEmpty( warRunDependency.contextPath ) ? "/" : warRunDependency.contextPath;
                        if ( propertyWarValue != null )
                        {
View Full Code Here

Examples of org.apache.commons.compress.archivers.ArchiveOutputStream.closeArchiveEntry()

            if ( serverXml != null && serverXml.exists() )
            {
                os.putArchiveEntry( new JarArchiveEntry( "conf/server.xml" ) );
                IOUtils.copy( new FileInputStream( serverXml ), os );
                os.closeArchiveEntry();
                properties.put( Tomcat7Runner.USE_SERVER_XML_KEY, Boolean.TRUE.toString() );
            }
            else
            {
                properties.put( Tomcat7Runner.USE_SERVER_XML_KEY, Boolean.FALSE.toString() );
View Full Code Here

Examples of org.apache.commons.compress.archivers.ArchiveOutputStream.closeArchiveEntry()

                properties.put( Tomcat7Runner.USE_SERVER_XML_KEY, Boolean.FALSE.toString() );
            }

            os.putArchiveEntry( new JarArchiveEntry( "conf/web.xml" ) );
            IOUtils.copy( getClass().getResourceAsStream( "/conf/web.xml" ), os );
            os.closeArchiveEntry();

            properties.store( tmpPropertiesFileOutputStream, "created by Apache Tomcat Maven plugin" );

            tmpPropertiesFileOutputStream.flush();
            tmpPropertiesFileOutputStream.close();
View Full Code Here

Examples of org.apache.commons.compress.archivers.ArchiveOutputStream.closeArchiveEntry()

            tmpPropertiesFileOutputStream.flush();
            tmpPropertiesFileOutputStream.close();

            os.putArchiveEntry( new JarArchiveEntry( Tomcat7RunnerCli.STAND_ALONE_PROPERTIES_FILENAME ) );
            IOUtils.copy( new FileInputStream( tmpPropertiesFile ), os );
            os.closeArchiveEntry();

            // add tomcat classes
            for ( Artifact pluginArtifact : pluginArtifacts )
            {
                if ( StringUtils.equals( "org.apache.tomcat", pluginArtifact.getGroupId() ) || StringUtils.equals(
View Full Code Here

Examples of org.apache.commons.compress.archivers.ArchiveOutputStream.closeArchiveEntry()

            tmpManifestWriter.flush();
            tmpManifestWriter.close();

            os.putArchiveEntry( new JarArchiveEntry( "META-INF/MANIFEST.MF" ) );
            IOUtils.copy( new FileInputStream( tmpManifestFile ), os );
            os.closeArchiveEntry();

            if ( attachArtifact )
            {
                //MavenProject project, String artifactType, String artifactClassifier, File artifactFile
                projectHelper.attachArtifact( project, attachArtifactClassifierType, attachArtifactClassifier,
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.