Utility methods used on the command line.
Modifiers | Name | Description |
---|---|---|
protected java.lang.Object |
appClassName |
|
protected GrailsBuildEventListener |
buildEventListener |
|
protected java.util.Properties |
buildProps |
|
protected BuildSettings |
buildSettings |
|
protected groovy.util.ConfigSlurper |
configSlurper |
|
protected boolean |
enableProfile |
|
protected java.lang.String |
grailsAppName |
|
protected java.io.File |
grailsHome |
|
protected boolean |
isInteractive |
|
protected Metadata |
metadata |
|
protected java.io.File |
metadataFile |
|
protected PluginBuildSettings |
pluginSettings |
|
protected java.lang.String |
pluginsHome |
|
protected PathMatchingResourcePatternResolver |
resolver |
Constructor and description |
---|
BaseSettingsApi
(BuildSettings buildSettings, boolean interactive) |
BaseSettingsApi
(BuildSettings settings, GrailsBuildEventListener buildEventListener, boolean interactive) |
Type | Name and description |
---|---|
boolean |
confirmInput(java.lang.String message, java.lang.String code) Interactive prompt that can be used by any part of the build. |
boolean |
confirmInput(java.lang.String message) |
void |
copyGrailsResource(java.lang.Object targetFile, Resource resource) Copies a Spring resource to the file system. |
void |
copyGrailsResource(java.lang.Object targetFile, Resource resource, boolean overwrite) |
void |
copyGrailsResources(java.lang.Object destDir, java.lang.Object pattern) |
void |
copyGrailsResources(java.lang.Object destDir, java.lang.Object pattern, boolean overwrite) |
groovy.util.XmlSlurper |
createXmlSlurper() |
void |
enableUaa() |
void |
exit(int code) Exits the build immediately with a given exit code. |
java.lang.Object |
getAppClassName() |
java.lang.String |
getAppGrailsVersion() |
GrailsBuildEventListener |
getBuildEventListener() |
java.util.Properties |
getBuildProps() |
BuildSettings |
getBuildSettings() |
groovy.util.ConfigSlurper |
getConfigSlurper() |
java.lang.String |
getGrailsAppName() |
java.lang.String |
getGrailsAppVersion() |
java.io.File |
getGrailsHome() |
boolean |
getIsInteractive() |
Metadata |
getMetadata() |
java.io.File |
getMetadataFile() |
PluginBuildSettings |
getPluginBuildSettings() |
PluginBuildSettings |
getPluginSettings() |
java.lang.String |
getPluginsHome() |
java.lang.Object |
getPropertyValue(java.lang.String propName, java.lang.Object defaultValue) Resolves the value for a given property name. |
PathMatchingResourcePatternResolver |
getResolver() |
java.lang.String |
getServerHost() |
int |
getServerPort() |
int |
getServerPortHttps() |
java.lang.String |
getServletVersion() |
Resource |
grailsResource(java.lang.String path) Closure that returns a Spring Resource - either from $GRAILS_HOME if that is set, or from the classpath. |
protected boolean |
isDeclared(java.lang.Object cla, java.lang.reflect.Method readMethod) |
boolean |
isEnableProfile() |
void |
logError(java.lang.String message, java.lang.Throwable t) |
void |
logErrorAndExit(java.lang.String message, java.lang.Throwable t) |
void |
makeApiAvailableToScripts(groovy.lang.Binding binding, java.lang.Object cla) |
java.lang.String |
makeRelative(java.lang.String path) |
java.lang.String |
makeRelative(java.io.File file) |
void |
profile(java.lang.String name, groovy.lang.Closure<?> callable) Times the execution of a closure, which can include a target. |
java.util.List<groovy.util.slurpersupport.GPathResult> |
readAllPluginXmlMetadata() Reads all installed plugin descriptors returning a list |
groovy.util.slurpersupport.GPathResult |
readPluginXmlMetadata(java.lang.String pluginName) Reads a plugin.xml descriptor for the given plugin name |
Resource[] |
resolveResources(java.lang.String pattern) |
void |
updateMetadata(Metadata metadata, java.util.Map entries) |
void |
updateMetadata(java.util.Map entries) Modifies the application's metadata, as stored in the "application.properties" file. |
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() |
Interactive prompt that can be used by any part of the build. Echos
the given message to the console and waits for user input that matches
either 'y' or 'n'. Returns true
if the user enters 'y',
false
otherwise.
Copies a Spring resource to the file system.
Exits the build immediately with a given exit code.
Resolves the value for a given property name. It first looks for a system property, then in the BuildSettings configuration, and finally uses the given default value if other options are exhausted.
Closure that returns a Spring Resource - either from $GRAILS_HOME if that is set, or from the classpath.
Times the execution of a closure, which can include a target. For example, profile("compile", compile) where 'compile' is the target.
Reads all installed plugin descriptors returning a list
Reads a plugin.xml descriptor for the given plugin name
Modifies the application's metadata, as stored in the "application.properties" file. If it doesn't exist, the file is created.