private void executeJSWScript( final String command, final boolean spawn ) { File script = getControlScript(); ExecTask exec = ant.createTask( ExecTask.class ); exec.setExecutable( this.controlScriptCanonicalPath ); if ( spawn ) { exec.setSpawn( true ); } else { exec.setFailIfExecutionFails( true ); exec.setFailonerror( true ); } Commandline.Argument arg = exec.createArg(); arg.setValue( command ); exec.setDir( script.getParentFile() ); logger.debug( "Executing {} script cmd {} {}", new Object[]{ appName, this.controlScriptCanonicalPath, command } ); exec.execute(); }
exec.setErrorProperty("exec.error"); exec.setDir(packageDir); exec.setFailIfExecutionFails(true); exec.setResultProperty("exec.result");
exec.setFailIfExecutionFails( true ); exec.setFailonerror( true ); exec.setFailIfExecutionFails( true );