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

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

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

Java.setLocation介绍

暂无

代码示例

代码示例来源:origin: org.jclouds/jclouds-antcontrib

@Override
public void setLocation(Location location) {
 super.setLocation(location);
 scp.setLocation(location);
}

代码示例来源:origin: org.fornax.toolsupport/fornax-oaw-m2-plugin

public JavaTaskBuilder(MavenProject project, ClassRealm realm) {
  this.mvnProject = project;
  this.realm = realm;
  this.javaTask = new Java();
  this.antProject = new ProjectExt(realm);
  antProject.setBaseDir(project.getBasedir());
  antProject.setCoreLoader(realm.getClassLoader());
  javaTask.setProject(antProject);
  javaTask.setLocation(new Location(project.getBasedir().getAbsolutePath()));
  javaTask.setDir(project.getBasedir());
  Target target = new Target();
  antProject.addTarget("run-workflow", target);
  target.addTask(javaTask);
  configureClasspath();
}

代码示例来源: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");
  }
}

相关文章