@CompileStatic class GrailsCli extends Object
Main class for the Grails command line. Handles interactive mode and running Grails commands within the context of a profile
Modifiers | Name | Description |
---|---|---|
class |
GrailsCli.1 |
|
static class |
GrailsCli.ExecutionContextImpl |
Modifiers | Name | Description |
---|---|---|
static String |
DEFAULT_PROFILE_NAME |
Type | Name and description |
---|---|
static String |
ARG_SPLIT_PATTERN |
SortedAggregateCompleter |
aggregateCompleter |
Boolean |
ansiEnabled |
CodeGenConfig |
applicationConfig |
CommandLineParser |
cliParser |
Character |
defaultInputMask |
boolean |
integrateGradle |
boolean |
keepRunning |
Profile |
profile |
List<GrailsRepositoryConfiguration> |
profileRepositories |
ProfileRepository |
profileRepository |
ProjectContext |
projectContext |
Constructor and description |
---|
GrailsCli() |
Type Params | Return Type | Name and description |
---|---|---|
|
protected Boolean |
bang(ExecutionContext context) |
|
ExecutionContext |
createExecutionContext(CommandLine commandLine) |
|
protected MavenProfileRepository |
createMavenProfileRepository() |
|
int |
execute(String[] args) Execute the given command |
|
protected boolean |
executeCommandWithArgumentValidation(Command cmd, CommandLine mainCommandLine) |
|
protected boolean |
executeProcess(ExecutionContext context, String[] args) |
|
static void |
exit(int code) |
<T> |
static T |
getSetting(String key, Class<T> targetType, T defaultValue) Obtains a value from USER_HOME/.grails/settings.yml |
|
Boolean |
handleCommand(CommandLine commandLine) |
|
Boolean |
handleCommand(ExecutionContext context) |
|
protected void |
initializeApplication(CommandLine mainCommandLine) |
|
static boolean |
isInteractiveModeActive() |
|
static void |
main(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 |
triggerAppLoad() |
Execute the given command
args
- The argumentsObtains a value from USER_HOME/.grails/settings.yml
key
- the property name to resolvetargetType
- the expected type of the property valuedefaultValue
- The default valueMain method for running via the command line
args
- The arguments