コード例 #1
0
ファイル: ShellBuilder.java プロジェクト: ppalaga/srcdeps
 protected List<String> mergeArguments(BuildRequest request) {
   List<String> result = new ArrayList<>();
   if (request.isAddDefaultBuildArguments()) {
     result.addAll(getDefaultBuildArguments());
   }
   result.addAll(request.getBuildArguments());
   result.addAll(getVerbosityArguments(request.getVerbosity()));
   result.addAll(getSkipTestsArguments(request.isSkipTests()));
   result.addAll(getForwardPropertiesArguments(request.getForwardProperties()));
   return result;
 }
コード例 #2
0
ファイル: ShellBuilder.java プロジェクト: ppalaga/srcdeps
  @Override
  public void build(BuildRequest request) throws BuildException {

    List<String> args = mergeArguments(request);
    ShellCommand command =
        ShellCommand.builder() //
            .executable(executable) //
            .arguments(args) //
            .workingDirectory(request.getProjectRootDirectory()) //
            .environment(request.getBuildEnvironment()) //
            .ioRedirects(request.getIoRedirects()) //
            .timeoutMs(request.getTimeoutMs()) //
            .build();
    Shell.execute(command).assertSuccess();
  }