gpt4 book ai didi

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

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

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

ZipArchiver.addFile介绍

暂无

代码示例

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

private void addR( ZipArchiver zipArchiver ) throws MojoExecutionException, IOException
{
  final File rFile = new File( targetDirectory, "R.txt" );
  if ( !rFile.exists() )
  {
    getLog().debug( "No resources - creating empty R.txt" );
    if ( !rFile.createNewFile() )
    {
      getLog().warn( "Unable to create R.txt in AAR" );
    }
  }
  zipArchiver.addFile( rFile, "R.txt" );
  getLog().debug( "Packaging R.txt in AAR" );
}

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

for ( File bin : bins.listFiles() )
  archiver.addFile( bin, brandingToken + "/bin/" + bin.getName(), 0755 );

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

/**
 * Adds all shared libraries (.so) to a {@link JarArchiver} under 'jni'.
 *
 * @param zipArchiver The jarArchiver to add files to
 * @param directory   The directory to scan for .so files
 * @param architecture      The prefix for where in the jar the .so files will go.
 */
protected void addSharedLibraries( ZipArchiver zipArchiver, File directory, String architecture )
{
  getLog().debug( "Searching for shared libraries in " + directory );
  File[] libFiles = directory.listFiles( new FilenameFilter()
  {
    public boolean accept( final File dir, final String name )
    {
      return name.startsWith( "lib" ) && name.endsWith( ".so" );
    }
  } );
  if ( libFiles != null )
  {
    for ( File libFile : libFiles )
    {
      String dest = NATIVE_LIBRARIES_FOLDER + "/" + architecture + "/" + libFile.getName();
      getLog().debug( "Adding " + libFile + " as " + dest );
      zipArchiver.addFile( libFile, dest );
    }
  }
}

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

for ( File bin : bins.listFiles() )
  archiver.addFile( bin, brandingToken + "/bin/" + bin.getName(), 0755 );

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

zipArchiver.setDestFile( aarLibrary );
zipArchiver.addFile( destinationManifestFile, "AndroidManifest.xml" );
addDirectory( zipArchiver, assetsDirectory, "assets", false );
zipArchiver.addFile( classesJar, SdkConstants.FN_CLASSES_JAR );
  zipArchiver.addFile( mergedConsumerProguardFile, "proguard.txt" );

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

private void createZip( String[] files, File zipFile, String basedir )
    throws IOException
  {
    try
    {
      ZipArchiver archiver = (ZipArchiver) this.archiverManager.getArchiver( zipFile );
      archiver.setDestFile( zipFile );
      for ( String file : files )
      {
        archiver.addFile( new File( basedir, file ), file );
      }
      archiver.createArchive();
    }
    catch ( NoSuchArchiverException e )
    {
      // should never happen
    }
  }
}

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

archiver.addFile( servlet, "WEB-INF/lib/jnlp-servlet.jar" );
archiver.addResource( new PlexusIoResource() {
  public @Override InputStream getContents() throws IOException

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

archiver.addFile( servlet, "WEB-INF/lib/jnlp-servlet.jar" );
archiver.addResource( new PlexusIoResource() {
  public @Override InputStream getContents() throws IOException

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