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

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

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

Java.setTaskName介绍

暂无

代码示例

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

helperTask.setFork(true);
helperTask.setClassname("weblogic.jspc");
helperTask.setTaskName(getTaskName());

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

/**
 * Verify the produced jar file by invoking the Borland verify tool
 * @param sourceJar java.io.File representing the produced jar file
 */
private void verifyBorlandJarV4(File sourceJar) {
  Java javaTask = null;
  log("verify BAS " + sourceJar, Project.MSG_INFO);
  try  {
    String args = verifyArgs;
    args += " " + sourceJar.getPath();
    javaTask = new Java(getTask());
    javaTask.setTaskName("verify");
    javaTask.setClassname(VERIFY);
    Commandline.Argument arguments = javaTask.createArg();
    arguments.setLine(args);
    Path classpath = getCombinedClasspath();
    if (classpath != null)  {
      javaTask.setClasspath(classpath);
      javaTask.setFork(true);
    }
    log("Calling " + VERIFY + " for " + sourceJar.toString(),
      Project.MSG_VERBOSE);
    javaTask.execute();
  } catch (Exception e) {
    //TO DO : delete the file if it is not a valid file.
    String msg = "Exception while calling " + VERIFY + " Details: "
      + e.toString();
    throw new BuildException(msg, e);
  }
}

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

findbugsEngine = new Java();
findbugsEngine.setProject(getProject());
findbugsEngine.setTaskName(getTaskName());
findbugsEngine.setFork(true);
if (jvm.length() > 0) {

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

findbugsEngine = (Java) getProject().createTask("java");
findbugsEngine.setTaskName(getTaskName());
findbugsEngine.setFork(true);

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

javaTask.setTaskName("ejbc");

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

javaTask.setTaskName("ejbdeploy");
javaTask.setClassname("com.ibm.etools.ejbdeploy.EJBDeploy");

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

genicTask.setTaskName("genic");
genicTask.setFork(true);

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

java.setTaskName("jasperc");
java.execute();
return true;

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

@Override
public void setTaskName(String taskName) {
 super.setTaskName(taskName);
 scp.setTaskName(taskName);
}

代码示例来源:origin: net.sf.antenna/antenna

java.setTaskName(parent.getTaskName());

代码示例来源:origin: net.sourceforge.cobertura/cobertura

protected Java getJava() {
  if (java == null) {
    java = (Java) getProject().createTask("java");
    java.setTaskName(getTaskName());
    java.setClassname(getClassName());
    java.setFork(true);

代码示例来源:origin: org.ow2.jonas/bootstrap-ant

bootstrapTask.setTaskName("JOnAS/Deploy");
  bootstrapTask.createArg().setValue("-a");
  bootstrapTask.createArg().setValue(fileName);
  bootstrapTask.log("Deploying '" + fileName + "'...", Project.MSG_INFO);
} else if (action.equals(ACTION_DELETE) || action.equals(ACTION_UNDEPLOY)) {
  bootstrapTask.setTaskName("JOnAS/Undeploy");
  bootstrapTask.createArg().setValue("-r");
  bootstrapTask.createArg().setValue(fileName);
  bootstrapTask.log("Undeploying '" + fileName + "'...", Project.MSG_INFO);
} else if (action.equals(ACTION_LIST)) {
  bootstrapTask.setTaskName("JOnAS/List");
  bootstrapTask.createArg().setValue("-l");
  getTask().log("Listing beans ...", Project.MSG_INFO);

代码示例来源:origin: net.sf.antenna/antenna

private void executeMPowerEmulator(String device) throws BuildException {
  String arguments = utility.getQuotedName(jadFile);
      
  log("Arguments : " + arguments, Project.MSG_VERBOSE);
  Java java = new Java();
  java.setProject(getProject());
  java.setTaskName(getTaskName());
  java.setFork(true);
  java.setJar(new File(utility.getWtkRelative("player.jar")));
  java.setArgs(arguments);
  java.executeJava();
}

代码示例来源:origin: wala/WALA

childJvm.setTaskName("test_" + mainClass.replace('.', '_'));
childJvm.setClasspath(new Path(p, getClasspathEntry("com.ibm.wala.shrike") + ":" +  getClasspathEntry("com.ibm.wala.util") + ":" +  instrumentedJarLocation));
childJvm.setClassname(mainClass);

代码示例来源:origin: andrena/macker

throw new BuildException("nested <classpath> element is required when fork=true");
getJvm().setTaskName("macker");
getJvm().setClassname(Macker.PACKAGE_DOTS + ".Macker");
getJvm().setFork(fork);

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

代码示例来源:origin: Chorus-bdd/Chorus

public void execute() throws BuildException {
  Java javaTask = (Java) getProject().createTask("java");
  javaTask.setTaskName(getTaskName());
  javaTask.setClassname("org.chorusbdd.chorus.Main");
  javaTask.setClasspath(classpath);

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

private void executeInForkedVM(String[] args) {
  try {
    // Create an instance of the compiler, redirecting output to
    // the project log
    Java java = (Java) (getProject().createTask("java"));
    getProject().log("using classpath: " + classpath,
        Project.MSG_DEBUG);
    java.setClasspath(classpath);
    java.setClassname("org.apache.axis.client.AdminClient");
    for (int i = 0; i < args.length; i++) {
      java.createArg().setValue(args[i]);
    }
    java.setFailonerror(failOnError);
    //we are forking here to be sure that if AdminClient calls
    //System.exit() it doesn't halt the build
    java.setFork(true);
    java.setTaskName("AdminClient");
    java.execute();
  } catch (BuildException e) {
    //rethrow these
    throw e;
  } catch (Exception e) {
    throw new BuildException("Exception in " + getTaskName(), e);
  }
}

代码示例来源:origin: wvengen/proguard-maven-plugin

java.setTaskName("proguard");

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

final Java java = new Java();
java.setNewenvironment(true);
java.setTaskName("runjava");
java.setProject(project);
java.setFork(true);

相关文章