Configures the binding used when running Grails scripts.
Modifiers | Name | Description |
---|---|---|
static java.lang.String |
ARGS_MAP |
|
static java.lang.String |
BASEDIR |
|
static java.lang.String |
BASE_FILE |
|
static java.lang.String |
BASE_NAME |
|
static java.lang.String |
GRAILS_CONSOLE |
|
static java.lang.String |
GRAILS_ENV |
|
static java.lang.String |
GRAILS_HOME |
|
static java.lang.String |
GRAILS_SCRIPT |
|
static java.lang.String |
GRAILS_SETTINGS |
|
static java.lang.String |
GRAILS_VERSION |
|
static java.lang.String |
SCAFFOLD_DIR |
|
static java.lang.String |
USER_HOME |
Constructor and description |
---|
ScriptBindingInitializer
(CommandLine commandLine, java.net.URLClassLoader classLoader, BuildSettings settings, PluginPathDiscoverySupport pluginPathSupport, boolean interactive) |
Type Params | Return Type | Name and description |
---|---|---|
|
org.codehaus.gant.GantBinding |
initBinding(org.codehaus.gant.GantBinding binding, java.lang.String scriptName) Prep the binding. |
|
static BaseSettingsApi |
initBinding(groovy.lang.Binding binding, BuildSettings buildSettings, java.net.URLClassLoader classLoader, GrailsConsole grailsConsole, boolean interactive) |
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() |
Prep the binding. We add the location of GRAILS_HOME under the variable name "grailsHome". We also add a closure that should be used with "includeTargets <<" - it takes a string and returns either a file containing the named Grails script or the script class. So, this: includeTargets << grailsScript("Init") will load the "Init" script from $GRAILS_HOME/scripts if it exists there; otherwise it will load the Init class.