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

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

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

origin: io.takari/takari-archiver

 public UnArchiver build() {
  return new UnArchiver(includes, excludes, useRoot, flatten, posixLongFileMode);
 }
}
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.takari/takari-archiver

} else {
 if (archiveEntry.isDirectory()) {
  createDir(new File(outputDirectory, entryName));
  continue;
 createDir(outputFile.getParentFile());
 setFilePermissions(outputFile, FileMode.toPermissionsSet(mode));
} else {
 if (archiveEntry.isDirectory()) {
  setFilePermissions(outputFile, PosixModes.intModeToPosix(0755));
 } else {
  setFilePermissions(outputFile, PosixModes.intModeToPosix(0644));
origin: io.provis/provisio-core

public SimpleProvisioner(File localRepository, String remoteRepository) {
 this.localRepository = localRepository;
 this.remoteRepositoryUrl = remoteRepository;
 this.unarchiver = UnArchiver.builder().useRoot(false).flatten(false).build();
}
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.provis/provisio-jenkins

UnArchiver unarchiver = UnArchiver.builder().build();
for (String plugin : context.getPlugins()) {
 File pluginsDirectory = new File(workDirectory, "plugins");
 unarchiver.unarchive(pluginFileWithoutVersion, pluginDirectory);
origin: io.provis/provisio-core

try {
 UnArchiver unarchiver = UnArchiver.builder()
  .build();
 File unpackDirectory = new File(outputDirectory, "unpack");
 unarchiver.unarchive(archive, unpackDirectory);
io.tesla.proviso.archiveUnArchiver

Most used methods

  • unarchive
  • 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)
  • Github Copilot alternatives
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