GrailsCli (Grails 5.3.2)

Package: org.grails.cli

## [Groovy] Class GrailsCli

- org.grails.cli.GrailsCli

-     @groovy.transform.CompileStatic
      class GrailsCli
      extends java.lang.Object

  Main class for the Grails command line. Handles interactive mode and running Grails commands within the context of a profile

  Authors:
    Lari Hotari
    Graeme Rocher
  Since:
    3.0

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `class` | `GrailsCli.1` |
    `static class` | `GrailsCli.ExecutionContextImpl` |

  - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static java.lang.String` | `DEFAULT_PROFILE_NAME` |

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `static java.lang.String` | `ARG_SPLIT_PATTERN`
    `SortedAggregateCompleter` | `aggregateCompleter`
    `java.lang.Boolean` | `ansiEnabled`
    `CodeGenConfig` | `applicationConfig`
    `CommandLineParser` | `cliParser`
    `java.lang.Character` | `defaultInputMask`
    `boolean` | `integrateGradle`
    `boolean` | `keepRunning`
    `Profile` | `profile`
    `java.util.List<GrailsRepositoryConfiguration>` | `profileRepositories`
    `ProfileRepository` | `profileRepository`
    `ProjectContext` | `projectContext`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `GrailsCli ()`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected java.lang.Boolean` | `bang(ExecutionContext context)`
    `` | `ExecutionContext` | `createExecutionContext(CommandLine commandLine)`
    `` | `protected MavenProfileRepository` | `createMavenProfileRepository()`
    `` | `int` | `execute(java.lang.String[] args)` Execute the given command
    `` | `protected boolean` | `executeCommandWithArgumentValidation(Command cmd, CommandLine mainCommandLine)`
    `` | `protected boolean` | `executeProcess(ExecutionContext context, java.lang.String[] args)`
    `` | `static void` | `exit(int code)`
    `<T>` | `static T` | `getSetting(java.lang.String key, java.lang.Class<T> targetType, T defaultValue)` Obtains a value from USER_HOME/.grails/settings.yml
    `` | `java.lang.Boolean` | `handleCommand(CommandLine commandLine)`
    `` | `java.lang.Boolean` | `handleCommand(ExecutionContext context)`
    `` | `protected void` | `initializeApplication(CommandLine mainCommandLine)`
    `` | `static boolean` | `isInteractiveModeActive()`
    `` | `static void` | `main(java.lang.String[] args)` Main method for running via the command line
    `` | `protected void` | `outputMissingArgumentsMessage(Command cmd)`
    `` | `protected void` | `populateContextLoader()`
    `` | `protected GrailsConsole` | `setupCompleters()`
    `` | `protected void` | `startInteractiveMode(GrailsConsole console)`
    `` | `static void` | `tiggerAppLoad()`

  - ### 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

    - #### public static final java.lang.String DEFAULT_PROFILE_NAME

  - ### Property Detail

    - #### static final java.lang.String ARG_SPLIT_PATTERN

    - #### SortedAggregateCompleter aggregateCompleter

    - #### java.lang.Boolean ansiEnabled

    - #### CodeGenConfig applicationConfig

    - #### CommandLineParser cliParser

    - #### java.lang.Character defaultInputMask

    - #### boolean integrateGradle

    - #### boolean keepRunning

    - #### Profile profile

    - #### java.util.List<GrailsRepositoryConfiguration> profileRepositories

    - #### ProfileRepository profileRepository

    - #### ProjectContext projectContext

  - ### Constructor Detail

    - #### GrailsCli()

  - ### Method Detail

    - #### protected java.lang.Boolean bang(ExecutionContext context)

    - #### ExecutionContext createExecutionContext(CommandLine commandLine)

    - #### protected MavenProfileRepository createMavenProfileRepository()

    - #### int execute(java.lang.String[] args)

      Execute the given command

      Parameters:
        `args` - The arguments
      Returns:
        The exit status code

    - #### protected boolean executeCommandWithArgumentValidation(Command cmd, CommandLine mainCommandLine)

    - #### protected boolean executeProcess(ExecutionContext context, java.lang.String[] args)

    - #### static void exit(int code)

    - #### <T> static T getSetting(java.lang.String key, java.lang.Class<T> targetType, T defaultValue)

      Obtains a value from USER_HOME/.grails/settings.yml

      Parameters:
        `key` - the property name to resolve
        `targetType` - the expected type of the property value
        `defaultValue` - The default value

    - #### java.lang.Boolean handleCommand(CommandLine commandLine)

    - #### java.lang.Boolean handleCommand(ExecutionContext context)

    - #### protected void initializeApplication(CommandLine mainCommandLine)

    - #### static boolean isInteractiveModeActive()

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

      Main method for running via the command line

      Parameters:
        `args` - The arguments

    - #### protected void outputMissingArgumentsMessage(Command cmd)

    - #### protected void populateContextLoader()

    - #### protected GrailsConsole setupCompleters()

    - #### protected void startInteractiveMode(GrailsConsole console)

    - #### static void tiggerAppLoad()