org.apache.tools.ant.taskdefs.Get.setDest()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(135)

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

Get.setDest介绍

[英]Where to copy the source file.
[中]复制源文件的位置。

代码示例

代码示例来源:origin: org.apache.ant/ant

/**
 * Returns the file resolved from URL and directory
 * @param extension the extension
 * @param project the project
 * @return file the file resolved
 * @throws BuildException if the URL is invalid
 */
@Override
public File resolve(final Extension extension,
           final Project project) throws BuildException {
  validate();
  final File file = getDest();
  final Get get = new Get();
  get.setProject(project);
  get.setDest(file);
  get.setSrc(url);
  get.execute();
  return file;
}

代码示例来源:origin: org.dspace/dspace-stats

get.setDest(new File(spiders, url.getHost() + url.getPath().replace("/","-")));
get.setSrc(url);
get.setUseTimestamp(true);

代码示例来源:origin: DSpace/DSpace

get.setDest(new File(spiders, url.getHost() + url.getPath().replace("/", "-")));
get.setSrc(url);
get.setUseTimestamp(true);

代码示例来源:origin: appfuse/appfuse

get.setDest(pom);
get.execute();

代码示例来源:origin: dita-ot/dita-ot

private File get(final URL url, final String expectedChecksum) {
  final File tempPluginFile = new File(tempDir, "plugin.zip");
  final Get get = new Get();
  get.setProject(getProject());
  get.setTaskName("get");
  get.setSrc(url);
  get.setDest(tempPluginFile);
  get.setIgnoreErrors(false);
  get.setVerbose(false);
  get.execute();
  if (expectedChecksum != null) {
    final String checksum = getFileHash(tempPluginFile);
    if (!checksum.equalsIgnoreCase(expectedChecksum)) {
      throw new BuildException(new IllegalArgumentException(String.format("Downloaded plugin file checksum %s does not match expected value %s", checksum, expectedChecksum)));
    }
  }
  return tempPluginFile;
}

代码示例来源:origin: org.ow2.jonas.autostart/builder

/**
 * Extracts jonas-starter from jonas-builder archive.
 * @param builderJar the jonas-builder location
 */
public void initStarter(final String builderJar) throws BuilderException {
  Get get = new Get();
  Project project = new Project();
  try {
    get.setSrc(new URL(builderJar));
    get.setDest(this.workdirectory);
    get.setProject(project);
    get.execute();
    setStarterDefaultLocation(new File(this.workdirectory.getAbsolutePath(), this.jonasStarterJarFileTmpName));
  } catch (MalformedURLException ex) {
    Logger.getLogger(Builder.class.getName()).log(Level.SEVERE, null, ex);
  }
  Unzip unzip = new Unzip(this.output);
  unzip.setVerboseMode(this.verboseMode);
  unzip.setSrc(new File(builderJar));
  setStarterDefaultLocation(new File(this.workdirectory.getAbsolutePath(), this.jonasStarterJarFileTmpName));
  unzip.setDest(this.workdirectory);
  try {
    unzip.execute();
  } catch (UnzipException e) {
    throw new BuilderException("Unable to initialize starter", e);
  }
}

代码示例来源:origin: org.ow2.jonas.autostart/builder

get.setDest(this.workdirectory);
get.setProject(project);
get.execute();

代码示例来源:origin: org.ow2.jonas.autostart/builder

try {
  get.setSrc(new URL(this.applicationLocation[i]));
  get.setDest(new File(destFolder));
  get.setProject(project);
  get.execute();

代码示例来源:origin: org.seleniumhq.selenium.server/selenium-server-coreless

protected void downloadWithAnt(final URL url, final File outputFile) {
  Project p = new Project();
  p.addBuildListener(new AntJettyLoggerBuildListener(LOGGER));
  Get g = new Get();
  g.setProject(p);
  g.setSrc(url);
  g.setDest(outputFile);
  g.execute();
}

代码示例来源:origin: codehaus-cargo/cargo

getTask.setDest(targetFile);
getTask.execute();

代码示例来源:origin: org.testatoo.openqa/selenium-server

protected void downloadWithAnt(final URL url, final File outputFile) {
  Project p = new Project();
  p.addBuildListener(new AntJettyLoggerBuildListener(LOGGER));
  Get g = new Get();
  g.setProject(p);
  g.setSrc(url);
  g.setDest(outputFile);
  g.execute();
}

代码示例来源:origin: org.ow2.jonas.autostart/builder

get.setDest(new File(this.workdirectory, file));
get.setProject(project);
get.execute();

相关文章