Tabnine Logo
UnArchiver.unarchive
Code IndexAdd Tabnine to your IDE (free)

How to use
unarchive
method
in
io.tesla.proviso.archive.UnArchiver

Best Java code snippets using io.tesla.proviso.archive.UnArchiver.unarchive (Showing top 5 results out of 315)

origin: takari/takari-maven-plugin

@Override
public void execute() throws MojoExecutionException, MojoFailureException {
 //
 // Fetch the latest wrapper archive
 // Unpack it in the current working project
 // Possibly interpolate the latest version of Maven in the wrapper properties
 //
 File localRepository = new File(System.getProperty("user.home"), ".m2/repository");
 String artifactPath = String.format("io/takari/maven-wrapper/%s/maven-wrapper-%s.tar.gz", version, version);
 String wrapperUrl = String.format("https://repo1.maven.org/maven2/%s", artifactPath);
 File destination = new File(localRepository, artifactPath);
 Downloader downloader = new DefaultDownloader("mvnw", version);
 try {
  downloader.download(new URI(wrapperUrl), destination);
  UnArchiver unarchiver = UnArchiver.builder().useRoot(false).build();
  Path rootDirectory = Paths.get(session.getExecutionRootDirectory());
  unarchiver.unarchive(destination, rootDirectory.toFile());
  overwriteDistributionUrl(rootDirectory, getDistributionUrl());
  getLog().info("");
  getLog().info("The Maven Wrapper version " + version + " has been successfully setup for your project.");
  getLog().info("Using Apache Maven " + maven);
  getLog().info("");
 } catch (Exception e) {
  throw new MojoExecutionException("Error installing the maven-wrapper archive.", e);
 }
}
origin: io.provis/provisio-jenkins

unarchiver.unarchive(pluginFileWithoutVersion, pluginDirectory);
origin: io.provis/provisio-core

@Override
public void execute(ProvisioningContext context) {
 if (!outputDirectory.exists()) {
  outputDirectory.mkdirs();
 }
 File archive = artifact.getFile();
 try {
  UnArchiver unarchiver = UnArchiver.builder()
   .includes(split(includes))
   .excludes(split(excludes))
   .useRoot(useRoot)
   .flatten(flatten)
   .build();
  if (filter) {
   unarchiver.unarchive(archive, outputDirectory, new StandardFilteringProcessor(context.getVariables()));
  } else if (mustache) {
   unarchiver.unarchive(archive, outputDirectory, new MustacheFilteringProcessor(context.getVariables()));
  } else {
   unarchiver.unarchive(archive, outputDirectory);
  }
 } catch (IOException e) {
  throw new RuntimeException(e);
 }
}
origin: io.takari/takari-archiver

public void unarchive(File archive, File outputDirectory, UnarchivingEntryProcessor entryProcessor) throws IOException {
 //
 // These are the contributions that unpacking this archive is providing
 //
 if (outputDirectory.exists() == false) {
  outputDirectory.mkdirs();
 }
 Source source = ArchiverHelper.getArchiveHandler(archive, posixLongFileMode).getArchiveSource();
 for (Entry archiveEntry : source.entries()) {
  String entryName = archiveEntry.getName();
  if (useRoot == false) {
   entryName = entryName.substring(entryName.indexOf('/') + 1);
  }
  if (!selector.include(entryName)) {
   continue;
  }
  //
  // Process the entry name before any output is created on disk
  //
  entryName = entryProcessor.processName(entryName);
  //
  // So with an entry we may want to take a set of entry in a set of directories and flatten them
  // into one directory, or we may want to preserve the directory structure.
  //
  if (flatten) {
   entryName = entryName.substring(entryName.lastIndexOf("/") + 1);
  } else {
   if (archiveEntry.isDirectory()) {
    createDir(new File(outputDirectory, entryName));
    continue;
origin: io.provis/provisio-core

 .build();
File unpackDirectory = new File(outputDirectory, "unpack");
unarchiver.unarchive(archive, unpackDirectory);
io.tesla.proviso.archiveUnArchiverunarchive

Popular methods of UnArchiver

  • builder
  • <init>
  • createDir
  • setFilePermissions

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • addToBackStack (FragmentTransaction)
  • runOnUiThread (Activity)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Path (java.nio.file)
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Runner (org.openjdk.jmh.runner)
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now