createClasspathParts(); createNewArgs(txt); super.setFork(fork); super.setClassname(useGroovyShell ? "groovy.lang.GroovyShell" : "org.codehaus.groovy.ant.Groovy"); configureCompiler();
/** * 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(); }
helperTask.setFork(true); helperTask.setClassname("weblogic.jspc"); helperTask.setTaskName(getTaskName());
/** * 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); } }
findbugsEngine.setProject(getProject()); findbugsEngine.setTaskName(getTaskName()); findbugsEngine.setFork(true); if (jvm.length() > 0) { findbugsEngine.setJvm(jvm);
findbugsEngine.setFork(true);
javaTask.setFork(true); if (classpath != null) { javaTask.setClasspath(classpath);
/** * 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(); }
execTask.setFork(true); execTask.createArg().setValue("generateclient"); if (debug) {
javaTask.setFork(true); if (classpath != null) { javaTask.setClasspath(classpath);
genicTask.setFork(true);
java.setFork(true); java.setTaskName("jasperc"); java.execute();
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(); }
/** * Sets whether to run the task in a separate VM. * * @param f if true then run in a separate VM. */ public void setFork(boolean f) { super.setFork(f); this.fork = f; }
public JavaTaskBuilder fork(boolean fork) { javaTask.setFork(fork); this.fork = fork; antProject.setFork(fork); return this; }
@Override protected void addOverridesToJavaTask(final Product ctx, Java java) { // Note: FeCru doesn't support asynchronous startup, because setSpawn(true) returns an error // (output and timeout are forbidden). java.setFork(true); java.setDir(getAppDirectory(ctx)); } }
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(); }
protected void installLiberty(File jarFile) throws Exception { Java java = (Java) getProject().createTask("java"); java.setJar(jarFile); java.setFork(true); java.createArg().setValue("-acceptLicense"); java.createArg().setValue(baseDir); int exitCode = java.executeJava(); if (exitCode != 0) { throw new BuildException("Error installing Liberty."); } }
public Java newJavaTask(Parameters params) { Java java = (Java) antUtils.createAntTask("java"); java.setFork(true); // If the user has not specified any output file then the process's output will be logged // to the Ant logging subsystem which will in turn go to the Cargo's logging subsystem as // we're configuring Ant with our own custom build listener (see below). setOutput(params.output, java); // Add a build listener to the Ant project so that we can catch what the Java task logs addBuildListener(java); // Add system properties for the container JVM addSystemProperties(java, params.systemProperties); // Add JVM args if defined addJvmArgs(java, params.jvmArgs); return java; }
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(); }