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

x33g5p2x  于2022-01-21 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(64)

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

Java.setAppend介绍

[英]If true, append output to existing file.
[中]如果为true,则将输出附加到现有文件。

代码示例

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

/**
 * {@inheritDoc}
 */
@Override
public void setAppendOutput(boolean appendOutput)
{
  this.java.setAppend(appendOutput);
}

代码示例来源:origin: com.atlassian.maven.plugins/maven-amps-plugin

private void setOutput(String output, Java java)
{
  if (output != null)
  {
    File outputFile = new File(output);
    
    // Ensure that directories where the output file will go are created
    outputFile.getAbsoluteFile().getParentFile().mkdirs();
    
    java.setOutput(outputFile);
    java.setAppend(true);
  }
}

代码示例来源:origin: com.atlassian.maven.plugins/amps-maven-plugin

private void setOutput(String output, Java java)
{
  if (output != null)
  {
    File outputFile = new File(output);
    
    // Ensure that directories where the output file will go are created
    outputFile.getAbsoluteFile().getParentFile().mkdirs();
    
    java.setOutput(outputFile);
    java.setAppend(true);
  }
}

代码示例来源:origin: axis/axis-ant

private void executeForkedAntTask() {
  /* if (callee2 == null) { */
    callee2 = (Java) getProject().createTask("java");
    callee2.setOwningTarget(getOwningTarget());
    callee2.setTaskName(getTaskName());
    callee2.setLocation(getLocation());
    callee2.setClassname("org.apache.tools.ant.Main");
    callee2.setAppend(true);
    callee2.setFork(true);
    callee2.createJvmarg().setValue("-Xbootclasspath/p:" + System.getProperty("sun.boot.class.path"));
  /* }                      */
  String systemClassPath = System.getProperty("java.class.path");
  callee2.setClasspath(new Path(getProject(), systemClassPath));
  String args = "-buildfile " + properties.get("file");
  Commandline.Argument arguments = callee2.createArg();
  arguments.setLine(args);
  if (verbose) {
    callee2.createArg().setValue("-verbose");
  }
  callee2.createArg().setValue(subTarget);
  if (callee2.executeJava() != 0) {
    throw new BuildException("Execution of ANT Task failed");
  }
}

相关文章