Project.MSG_INFO), null); log(cmdl.describeCommand(), Project.MSG_VERBOSE); process.setCommandline(cmdl.getCommandline());
Project.MSG_INFO), null); log(cmdl.describeCommand(), Project.MSG_VERBOSE); process.setCommandline(cmdl.getCommandline());
log(cmd.describeCommand(), Project.MSG_VERBOSE); int retVal; try {
log(getFindbugsEngine().getCommandLine().describeCommand());
log(cmd.describeCommand(), Project.MSG_VERBOSE); int retVal; try {
log("Permissions can not be set this way in forked mode.", Project.MSG_WARN); log(getCommandLine().describeCommand(), Project.MSG_VERBOSE); } else { if (getCommandLine().getVmCommand().size() > 1) {
private int executeRunnerClassAsForked() throws BuildException { CommandlineJava cmd = initializeJavaCommand(); Execute execute = new Execute(new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN)); String[] commandLine = cmd.getCommandline(); log("Executing: " + StringUtils.join(Arrays.asList(commandLine), " ")); execute.setCommandline(commandLine); execute.setNewenvironment(false); execute.setAntRun(getProject()); log(cmd.describeCommand(), Project.MSG_VERBOSE); int retVal; try { retVal = execute.execute(); } catch (IOException e) { throw new BuildException("Process fork failed.", e, getLocation()); } return retVal; }
private int executeRunnerClassAsForked() throws BuildException { CommandlineJava cmd = initializeJavaCommand(); Execute execute = new Execute(new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN)); String[] commandLine = cmd.getCommandline(); log("Executing: " + StringUtils.join(Arrays.asList(commandLine), " ")); execute.setCommandline(commandLine); execute.setNewenvironment(false); execute.setAntRun(getProject()); log(cmd.describeCommand(), Project.MSG_VERBOSE); int retVal; try { retVal = execute.execute(); } catch (IOException e) { throw new BuildException("Process fork failed.", e, getLocation()); } return retVal; }
public void testWsGenForkedCommand() { String method = "setupForkCommand"; String field = "cmd"; String arg = ""; //API jars are somewhere on the classpath File tmpDir = new File(System.getProperty("java.io.tmpdir"), "wsi2test"); WsGen2 wsg2 = new WsGen2(); wsg2.setFork(true); wsg2.setDestdir(new File(tmpDir, "dest")); wsg2.setSourcedestdir(new File(tmpDir, "srcDest")); CommandlineJava cmd = (CommandlineJava) run(WsGen2.class, wsg2, method, arg, field); verifyCommand(cmd.describeCommand()); //API jars are defined using CLASSPATH environment variable (= System class loader) ClassLoader cl = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(ClassLoader.getSystemClassLoader()); wsg2 = new WsGen2(); wsg2.setFork(true); wsg2.setDestdir(new File(tmpDir, "dest")); wsg2.setSourcedestdir(new File(tmpDir, "srcDest")); cmd = (CommandlineJava) run(WsGen2.class, wsg2, method, arg, field); verifyCommand(cmd.describeCommand()); } finally { Thread.currentThread().setContextClassLoader(cl); } }
public void testWsImportForkedCommand() { String method = "setupForkCommand"; String field = "cmd"; String arg = ""; //API jars are somewhere on the classpath File tmpDir = new File(System.getProperty("java.io.tmpdir"), "wsi2test"); WsImport2 wsi2 = new WsImport2(); wsi2.setFork(true); wsi2.setDestdir(new File(tmpDir, "dest")); wsi2.setSourcedestdir(new File(tmpDir, "srcDest")); CommandlineJava cmd = (CommandlineJava) run(WsImport2.class, wsi2, method, arg, field); verifyCommand(cmd.describeCommand()); //API jars are defined using CLASSPATH environment variable (= System class loader) ClassLoader cl = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(ClassLoader.getSystemClassLoader()); wsi2 = new WsImport2(); wsi2.setFork(true); wsi2.setDestdir(new File(tmpDir, "dest")); wsi2.setSourcedestdir(new File(tmpDir, "srcDest")); cmd = (CommandlineJava) run(WsImport2.class, wsi2, method, arg, field); verifyCommand(cmd.describeCommand()); } finally { Thread.currentThread().setContextClassLoader(cl); } }
log(getFindbugsEngine().getCommandLine().describeCommand());
log(getFindbugsEngine().getCommandLine().describeCommand());
execute.setEnvironment(environment); log(cmd.describeCommand(), Project.MSG_VERBOSE);