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

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

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

Java.setClassname介绍

[英]Set the Java class to execute.
[中]设置要执行的Java类。

代码示例

代码示例来源:origin: apache/groovy

createNewArgs(txt);
super.setFork(fork);
super.setClassname(useGroovyShell ? "groovy.lang.GroovyShell" : "org.codehaus.groovy.ant.Groovy");
configureCompiler();
super.execute();

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

/**
 *  Perform the actual deployment.
 *  For this generic implementation, a JVM is spawned using the
 *  supplied classpath, classname, JVM args, and command line arguments.
 *  @exception BuildException if the attributes are invalid or incomplete.
 */
@Override
public void deploy() throws BuildException {
  java.setClassname(className);
  java.setClasspath(getClasspath());
  java.setFork(true);
  java.setFailonerror(true);
  java.execute();
}

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

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.setClassname(mainClass);

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

findbugsEngine.setClassname("edu.umd.cs.findbugs.LaunchAppropriateUI");
  findbugsEngine.createJvmarg().setValue("-Dspotbugs.home=" + homeDir.getPath());
} else {
  findbugsEngine.setClassname("edu.umd.cs.findbugs.LaunchAppropriateUI");

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

javaTask.setClassname(ejbcClassName);
javaTask.createArg().setLine(additionalArgs);
if (keepgenerated) {

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

/**
 *  Perform the actual deployment.
 *  For this implementation, a JVM is spawned and the weblogic.deploy
 *  tools is executed.
 *  @exception BuildException if the attributes are invalid or incomplete.
 */
@Override
public void deploy() {
  Java java = new Java(getTask());
  java.setFork(true);
  java.setFailonerror(true);
  java.setClasspath(getClasspath());
  java.setClassname(WEBLOGIC_DEPLOY_CLASS_NAME);
  java.createArg().setLine(getArguments());
  java.execute();
}

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

execTask.setClassname("com.inprise.server.commandline.EJBUtilities");

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

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

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

genicTask.setClassname(genicClass);

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

java.setClassname("org.apache.jasper.JspC");

代码示例来源:origin: hcoles/pitest

void execute(final Java java) {
 this.setOption(ConfigOption.INCLUDE_LAUNCH_CLASSPATH, "false");
 this.setOption(ConfigOption.CLASSPATH, generateAnalysisClasspath());
 java.setClasspath(generateLaunchClasspath());
 java.setClassname(MutationCoverageReport.class.getCanonicalName());
 java.setFailonerror(true);
 java.setFork(true);
 checkRequiredOptions();
 for (final Map.Entry<String, String> option : this.options.entrySet()) {
  java.createArg().setValue(
    "--" + option.getKey() + "=" + option.getValue());
 }
 java.execute();
}

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

/**
 * {@inheritDoc}
 */
@Override
public void setMainClass(String mainClass)
{
  if (mainClass != null)
  {
    this.java.setClassname(mainClass);
  }
}

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

public JavaTaskBuilder withWorkflowLauncherClass(String launcherClass) {
  javaTask.setClassname(launcherClass);
  return this;
}

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

/**
 * {@inheritDoc}
 */
public void configureJava(final Java task) {
  task.clearArgs();
  task.setClassname(ADMIN_CLASS);
  task.createArg().setValue("-start");
}

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

void execute(final Java java) {
 this.setOption(ConfigOption.INCLUDE_LAUNCH_CLASSPATH, "false");
 this.setOption(ConfigOption.CLASSPATH, generateAnalysisClasspath());
 java.setClasspath(generateLaunchClasspath());
 java.setClassname(MutationCoverageReport.class.getCanonicalName());
 java.setFailonerror(true);
 java.setFork(true);
 checkRequiredOptions();
 for (final Map.Entry<String, String> option : this.options.entrySet()) {
  java.createArg().setValue(
    "--" + option.getKey() + "=" + option.getValue());
 }
 java.execute();
}

代码示例来源:origin: javaserverfaces/mojarra

public void execute() throws BuildException {
  super.createArg().setValue(generatorConfig);
  super.createArg().setValue(facesConfig);
  super.setClassname(generatorClass);
  super.execute();
} // END execute

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

private AntJavaExecutorThread execFishEyeCmd(String bootCommand, final Product ctx, boolean useDebugArgs) throws MojoExecutionException
{
  final Map<String, String> properties = mergeSystemProperties(ctx);
  Java java = javaTaskFactory.newJavaTask(
      output(ctx.getOutput()).
      systemProperties(properties).
      jvmArgs(ctx.getJvmArgs() + (useDebugArgs ? ctx.getDebugArgs() : "")));
  addOverridesToJavaTask(ctx, java);
  Path classpath = java.createClasspath();
  classpath.createPathElement().setLocation(new File(getAppDirectory(ctx), "fisheyeboot.jar"));
  java.setClassname("com.cenqua.fisheye.FishEyeCtl");
  java.createArg().setValue(bootCommand);
  AntJavaExecutorThread javaThread = new AntJavaExecutorThread(java);
  javaThread.start();
  return javaThread;
}

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

private AntJavaExecutorThread execFishEyeCmd(String bootCommand, final Product ctx, boolean useDebugArgs) throws MojoExecutionException
{
  final Map<String, String> properties = mergeSystemProperties(ctx);
  Java java = javaTaskFactory.newJavaTask(
      output(ctx.getOutput()).
      systemProperties(properties).
      jvmArgs(ctx.getJvmArgs() + (useDebugArgs ? ctx.getDebugArgs() : "")));
  addOverridesToJavaTask(ctx, java);
  Path classpath = java.createClasspath();
  classpath.createPathElement().setLocation(new File(getAppDirectory(ctx), "fisheyeboot.jar"));
  java.setClassname("com.cenqua.fisheye.FishEyeCtl");
  java.createArg().setValue(bootCommand);
  AntJavaExecutorThread javaThread = new AntJavaExecutorThread(java);
  javaThread.start();
  return javaThread;
}

相关文章