gpt4 book ai didi

org.apache.tools.ant.types.ZipFileSet.setDir()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 23:02:49 27 4
gpt4 key购买 nike

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

ZipFileSet.setDir介绍

暂无

代码示例

代码示例来源:origin: spring-io/initializr

@RequestMapping("/starter.zip")
@ResponseBody
public ResponseEntity<byte[]> springZip(BasicProjectRequest basicRequest)
    throws IOException {
  ProjectRequest request = (ProjectRequest) basicRequest;
  File dir = this.projectGenerator.generateProjectStructure(request);
  File download = this.projectGenerator.createDistributionFile(dir, ".zip");
  String wrapperScript = getWrapperScript(request);
  new File(dir, wrapperScript).setExecutable(true);
  Zip zip = new Zip();
  zip.setProject(new Project());
  zip.setDefaultexcludes(false);
  ZipFileSet set = new ZipFileSet();
  set.setDir(dir);
  set.setFileMode("755");
  set.setIncludes(wrapperScript);
  set.setDefaultexcludes(false);
  zip.addFileset(set);
  set = new ZipFileSet();
  set.setDir(dir);
  set.setIncludes("**,");
  set.setExcludes(wrapperScript);
  set.setDefaultexcludes(false);
  zip.addFileset(set);
  zip.setDestFile(download.getCanonicalFile());
  zip.execute();
  return upload(download, dir, generateFileName(request, "zip"), "application/zip");
}

代码示例来源:origin: stackoverflow.com

ZipFileSet zipFileSet = new ZipFileSet();
zipFileSet.setPrefix("WEB-INF/lib");
zipFileSet.setDir(new File(libsToAddDir));
task.addFileset(zipFileSet);
task.setUpdate(true);

代码示例来源:origin: net.wasdev.wlp.ant/wlp-anttasks

private void updateSourceWar(File jspCompileDir) {
  // Finally need to merge the compiled jsps in
  War warTask = new War();
  warTask.setProject(getProject());
  warTask.setDestFile(war);
  warTask.setUpdate(true);
  ZipFileSet jspFiles = new ZipFileSet();
  // The JSPs will be in the a well known location. The
  // app name from server.xml and the war file name will
  // be
  // in the path, the war name minus the .war extension
  // (if present) will also be used.
  jspFiles.setDir(jspCompileDir);
  warTask.addClasses(jspFiles);
  warTask.setTaskName(getTaskName());
  warTask.execute();
}

代码示例来源:origin: org.apache.geronimo.framework/geronimo-plugin

zip.setDestFile(dest);
ZipFileSet fs = new ZipFileSet();
fs.setDir(source);
fs.setPrefix(serverName);
fs.setProject(project);

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