Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
  @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();
  }