Package: org.codehaus.groovy.grails.cli

## [Java] Class GrailsScriptRunner

- org.codehaus.groovy.grails.cli.GrailsScriptRunner

- Handles Grails command line interface for running scripts.

  Authors:
    Graeme Rocher
  Since:
    0.4

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static groovy.lang.Closure` | `DO_NOTHING_CLOSURE` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `GrailsScriptRunner ()`
    `GrailsScriptRunner (java.lang.String grailsHome)`
    `GrailsScriptRunner (BuildSettings settings)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `int` | `executeCommand(java.lang.String scriptName, java.lang.String args)`
    `int` | `executeCommand(java.lang.String scriptName, java.lang.String args, java.lang.String env)`
    `int` | `executeScriptWithCaching(CommandLine commandLine)`
    `java.util.List<java.io.File>` | `getAvailableScripts()` Returns a list of all the executable Gant scripts available to this application.
    `static CommandLineParser` | `getCommandLineParser()`
    `java.io.PrintStream` | `getOut()`
    `protected void` | `initializeLogging()`
    `void` | `initializeState()`
    `static void` | `main(java.lang.String[] args)` Evaluate the arguments to get the name of the script to execute, which environment to run it in, and the arguments to pass to the script.
    `void` | `setInteractive(boolean interactive)`
    `void` | `setOut(java.io.PrintStream outputStream)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Field Detail

    - #### @java.lang.SuppressWarnings("rawtypes") public static final groovy.lang.Closure DO_NOTHING_CLOSURE

  - ### Constructor Detail

    - #### public GrailsScriptRunner()

    - #### public GrailsScriptRunner(java.lang.String grailsHome)

    - #### public GrailsScriptRunner(BuildSettings settings)

  - ### Method Detail

    - #### public int executeCommand(java.lang.String scriptName, java.lang.String args)

    - #### public int executeCommand(java.lang.String scriptName, java.lang.String args, java.lang.String env)

    - #### public int executeScriptWithCaching(CommandLine commandLine)

    - #### public java.util.List<java.io.File> getAvailableScripts()

      Returns a list of all the executable Gant scripts available to this application.

    - #### public static CommandLineParser getCommandLineParser()

    - #### public java.io.PrintStream getOut()

    - #### protected void initializeLogging()

    - #### public void initializeState()

    - #### public static void main(java.lang.String[] args)

      Evaluate the arguments to get the name of the script to execute, which environment to run it in, and the arguments to pass to the script. This also evaluates arguments of the form "-Dprop=value" and creates system properties from each one.

      Parameters:
        `args` - Command line arguments

    - #### public void setInteractive(boolean interactive)

    - #### public void setOut(java.io.PrintStream outputStream)