gpt4 book ai didi

org.codehaus.plexus.archiver.zip.ZipArchiver.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 06:50:49 26 4
gpt4 key购买 nike

本文整理了Java中org.codehaus.plexus.archiver.zip.ZipArchiver.<init>()方法的一些代码示例,展示了ZipArchiver.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipArchiver.<init>()方法的具体详情如下:
包路径:org.codehaus.plexus.archiver.zip.ZipArchiver
类名称:ZipArchiver
方法名:<init>

ZipArchiver.<init>介绍

暂无

代码示例

代码示例来源:origin: apache/usergrid

/**
 * @param jarFile Jar file to be created
 * @param sourceFolder Jar file will be created out of the contents of this folder. This corresponds to the root
 * folder of the jar file once it is created.
 */
public static void archiveWar( File jarFile, String sourceFolder ) throws MojoExecutionException {
  try {
    ZipArchiver archiver = new ZipArchiver();
    archiver.enableLogging( new ConsoleLogger( org.codehaus.plexus.logging.Logger.LEVEL_INFO, "console" ) );
    archiver.setDestFile( jarFile );
    archiver.addDirectory( new File( sourceFolder ), "", new String[] { "**/*" }, null );
    archiver.createArchive();
  }
  catch ( Exception e ) {
    throw new MojoExecutionException( "Error while creating WAR file", e );
  }
}

代码示例来源:origin: simpligility/android-maven-plugin

final ZipArchiver zipArchiver = new ZipArchiver();
zipArchiver.setDestFile( aarLibrary );

代码示例来源:origin: org.mule.tools.maven/mule-packager

public MuleArchiver() {
 this(new ZipArchiver());
}

代码示例来源:origin: org.mule.tools.maven/mule-packager

public DomainBundleArchiver() {
 this(new ZipArchiver());
}

代码示例来源:origin: org.jetbrains.intellij.plugins/intellij-plugin-structure

@NotNull
public static AbstractArchiver createArchiver(@NotNull File file) {
 final String name = file.getName().toLowerCase();
 if (name.endsWith(".tar.gz")) {
  return new TarArchiver();
 } else if (name.endsWith(".zip")) {
  return new ZipArchiver();
 } else if (name.endsWith(".jar")) {
  return new JarArchiver();
 }
 throw new IllegalArgumentException("Unable to extract " + file + "- unknown file extension: " + name);
}

代码示例来源:origin: mojohaus/nbm-maven-plugin

ZipArchiver archiver = new ZipArchiver();
DefaultFileSet fs = new DefaultFileSet();
fs.setDirectory( outputDirectory );

代码示例来源:origin: org.codehaus.mojo/nbm-maven-plugin

ZipArchiver archiver = new ZipArchiver();
DefaultFileSet fs = new DefaultFileSet();
fs.setDirectory( outputDirectory );

代码示例来源:origin: org.wisdom-framework/wisdom-maven-plugin

private void createApplicationDistribution() throws IOException {
  File distFile = new File(this.buildDirectory, this.project.getArtifactId() + "-" + this.project
      .getVersion() + "." + fileExtension.extensionName);
  AbstractArchiver archiver;
  if (fileExtension == ApplicationDistributionExtensions.zip) {
    archiver = new ZipArchiver();
  } else {
    TarArchiver tarArchiver = new TarArchiver();
    tarArchiver.setCompression(TarArchiver.TarCompressionMethod.gzip);
    archiver = tarArchiver;
  }
  archiver.enableLogging(new PlexusLoggerWrapper(getLog()));
  archiver.addDirectory(getWisdomRootDirectory(), new String[0], new String[]{
      // Drop regular and test cache.
      "*-cache/**",
      "logs/**"});
  archiver.setDestFile(distFile);
  archiver.createArchive();
  if (attachDistribution) {
    projectHelper.attachArtifact(project, fileExtension.extensionName, distFile);
  }
}

代码示例来源:origin: org.codehaus.mojo/nbm-maven-plugin

ZipArchiver archiver = new ZipArchiver();
if ( codebase != null )

代码示例来源:origin: mojohaus/nbm-maven-plugin

ZipArchiver archiver = new ZipArchiver();
if ( codebase != null )

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com