Examples of Exec


Examples of org.apache.tajo.maven.plugin.util.Exec

        protocCommand = "protoc";
      }
      List<String> command = new ArrayList<String>();
      command.add(protocCommand);
      command.add("--version");
      Exec exec = new Exec(this);
      List<String> out = new ArrayList<String>();
      if (exec.run(command, out) == 127) {
        getLog().error("protoc, not found at: " + protocCommand);
        throw new MojoExecutionException("protoc failure");       
      } else {
        if (out.isEmpty()) {
          getLog().error("stdout: " + out);
          throw new MojoExecutionException(
              "'protoc --version' did not return a version");
        } else {
          if (!out.get(0).endsWith(protocVersion)) {
            throw new MojoExecutionException(
                "protoc version is '" + out.get(0) + "', expected version is '"
                    + protocVersion + "'");           
          }
        }
      }
      if (!output.mkdirs()) {
        if (!output.exists()) {
          throw new MojoExecutionException("Could not create directory: " +
            output);
        }
      }
      command = new ArrayList<String>();
      command.add(protocCommand);
      command.add("--java_out=" + output.getCanonicalPath());
      if (imports != null) {
        for (File i : imports) {
          command.add("-I" + i.getCanonicalPath());
        }
      }
      for (File f : FileSetUtils.convertFileSetToFiles(source)) {
        command.add(f.getCanonicalPath());
      }
      exec = new Exec(this);
      out = new ArrayList<String>();
      if (exec.run(command, out) != 0) {
        getLog().error("protoc compiler error");
        for (String s : out) {
          getLog().error(s);
        }
        throw new MojoExecutionException("protoc failure");
View Full Code Here

Examples of org.gradle.api.tasks.Exec

        return task;
    }

    private Task addRunLauch4jTask(Project project, Launch4jPluginExtension configuration)
    {
        final Exec task = makeTask(TASK_RUN_NAME, Exec.class);
        task.setDescription("Runs launch4j to generate an .exe file");
        task.setGroup(LAUNCH4J_GROUP);
        // TODO
        project.afterEvaluate(new Action<Project>() {
            @Override
            public void execute(Project project)
            {
                Launch4jPluginExtension ext = ((Launch4jPluginExtension) task.getProject().getExtensions().getByName(Launch4jPlugin.LAUNCH4J_CONFIGURATION_NAME));
               
                task.setCommandLine(ext.getLaunch4jCmd(), project.getBuildDir() + "/" + ext.getOutputDir() + "/" + ext.getXmlFileName());
                task.setWorkingDir(project.file(ext.getChdir()));
            }
        });
        return task;
    }
View Full Code Here

Examples of org.iosgi.outpost.operations.Exec

  }

  public int execute(List<String> command, File workDir, boolean block,
      File out, File err) throws InterruptedException,
      OperationExecutionException {
    Exec exec = new Exec(workDir, command, block, out, err);
    return perform(exec);
  }
View Full Code Here

Examples of org.python.pydev.parser.jython.ast.Exec

            case JJTFOR_STMT:
                ret = new For(null, null, null, null);
                break;

            case JJTEXEC_STMT:
                ret = new Exec(null, null, null);
                break;

            case JJTPASS_STMT:
                ret = new Pass();
                break;
View Full Code Here

Examples of org.python.pydev.parser.jython.ast.Exec

            case JJTEXEC_STMT:
                exprType locals = arity >= 3 ? ((exprType) stack.popNode()) : null;
                exprType globals = arity >= 2 ? ((exprType) stack.popNode()) : null;
                value = (exprType) stack.popNode();
                Exec exec = (Exec) n;
                exec.body = value;
                exec.locals = locals;
                exec.globals = globals;
                return exec;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.