@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
Modifiers | Name | Description |
---|---|---|
class |
GrailsCli.1 |
|
static class |
GrailsCli.ExecutionContextImpl |
|
private static class |
GrailsCli.ProjectContextImpl |
Modifiers | Name | Description |
---|---|---|
private static java.lang.String |
ARG_SPLIT_PATTERN |
|
static java.lang.String |
DEFAULT_PROFILE_NAME |
|
private static int |
KEYPRESS_CTRL_C |
|
private static int |
KEYPRESS_ESC |
|
private static java.lang.String |
PLUGIN_USAGE_MESSAGE |
|
private static NavigableMap |
SETTINGS_MAP |
|
private static java.lang.String |
USAGE_MESSAGE |
|
private SortedAggregateCompleter |
aggregateCompleter |
|
private java.lang.Boolean |
ansiEnabled |
|
private CodeGenConfig |
applicationConfig |
|
private CommandLineParser |
cliParser |
|
private static ExecutionContext |
currentExecutionContext |
|
private java.lang.Character |
defaultInputMask |
|
private boolean |
integrateGradle |
|
private static boolean |
interactiveModeActive |
|
private boolean |
keepRunning |
|
private SystemStreamsRedirector |
originalStreams |
|
private Profile |
profile |
|
private java.util.List<GrailsRepositoryConfiguration> |
profileRepositories |
|
private ProfileRepository |
profileRepository |
|
private ProjectContext |
projectContext |
|
private static boolean |
tiggerAppLoad |
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 and description |
---|
GrailsCli
() |
Type Params | Return Type | Name and description |
---|---|---|
|
static void |
|
|
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) |
|
private void |
exitInteractiveMode() |
|
private int |
getBaseUsage() |
<T> |
static T |
getSetting(java.lang.String key, java.lang.Class<T> targetType, T defaultValue) Obtains a value from USER_HOME/.grails/settings.yml |
|
private boolean |
handleBuiltInCommands(ExecutionContext context) |
|
java.lang.Boolean |
handleCommand(CommandLine commandLine) |
|
java.lang.Boolean |
handleCommand(ExecutionContext context) |
|
private java.lang.Boolean |
handleCommandWithCancellationSupport(GrailsConsole console, java.lang.String commandLine, java.util.concurrent.ExecutorService commandExecutor, jline.internal.NonBlockingInputStream nonBlockingInput) |
|
private void |
handleInteractiveMode() |
|
protected void |
initializeApplication(CommandLine mainCommandLine) |
|
private java.lang.Object |
initializeProfile() |
|
private void |
interactiveModeLoop(GrailsConsole console, java.util.concurrent.ExecutorService commandExecutor) |
|
static boolean |
isInteractiveModeActive() |
|
private CodeGenConfig |
loadApplicationConfig() |
|
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() |
|
private java.lang.String |
unescape(java.lang.String str) Removes '\' escape characters from the given string. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), 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() |
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 argumentsRemoves '\' escape characters from the given string.
Groovy Documentation