Interface ExecTask<U,V extends ExecTask<U,V>>

Type Parameters:
U - the type returned by the task execution
V - the type of the task
All Superinterfaces:
Task<U,V>
All Known Subinterfaces:
DebugTask, RunTask, StartTask

public interface ExecTask<U,V extends ExecTask<U,V>> extends Task<U,V>

Base execution task.

Since:
1.4
Author:
Jeremy Kuhn
  • Method Details

    • mainClass

      V mainClass(String mainClass)

      Sets the main class to be executed by the task.

      Parameters:
      mainClass - the canonical name of the main class in the project module
      Returns:
      the task
    • arguments

      V arguments(String arguments)

      Sets the arguments to pass to the application.

      Parameters:
      arguments - the application arguments
      Returns:
      the task
    • vmOptions

      V vmOptions(String vmOptions)

      Sets the VM options to pass to the application.

      Parameters:
      vmOptions - the VM options
      Returns:
      the task
    • workingPath

      V workingPath(Path workingPath)

      Sets the working path of the application.

      Parameters:
      workingPath - the working path
      Returns:
      the task
    • addUnnamedModules

      V addUnnamedModules(boolean addUnnamedModules)

      Sets whether unnamed modules should be added when executing the application.

      Defaults to true.

      Parameters:
      addUnnamedModules - true to add unnamed modules, false otherwise
      Returns:
      the task
    • redirectInput

      V redirectInput(ProcessBuilder.Redirect redirectInput)

      Sets where to redirect the application input stream.

      Defaults to ProcessBuilder.Redirect.INHERIT.

      Parameters:
      redirectInput - the input source
      Returns:
      the task
    • redirectOutput

      V redirectOutput(ProcessBuilder.Redirect redirectOutput)

      Sets where to redirect the application output stream.

      Defaults to ProcessBuilder.Redirect.INHERIT.

      Parameters:
      redirectOutput - the output destination
      Returns:
      the task
    • redirectError

      V redirectError(ProcessBuilder.Redirect redirectError)

      Sets where to redirect the application error stream.

      Defaults to ProcessBuilder.Redirect.INHERIT.

      Parameters:
      redirectError - the error destination
      Returns:
      the task