public class GrailsBuildHelper
extends java.lang.Object
BuildSettings
and GrailsScriptRunner. This
ensures class loader isolation for Grails.| Constructor and Description |
|---|
GrailsBuildHelper(java.lang.ClassLoader classLoader)
Creates a helper that loads the Grails build system with the given
class loader.
|
GrailsBuildHelper(java.lang.ClassLoader classLoader,
java.lang.String grailsHome)
Creates a helper that loads the Grails build system with the given
class loader.
|
GrailsBuildHelper(java.lang.ClassLoader classLoader,
java.lang.String grailsHome,
java.lang.String baseDir) |
| Modifier and Type | Method and Description |
|---|---|
int |
execute(java.lang.String script)
Executes the named Grails script with no arguments.
|
int |
execute(java.lang.String script,
java.lang.String args)
Executes the named Grails script with the given arguments.
|
int |
execute(java.lang.String script,
java.lang.String args,
java.lang.String env)
Executes the named Grails script with the given arguments in the
specified environment.
|
java.io.File |
getClassesDir() |
java.util.List |
getCompileDependencies() |
java.io.File |
getGlobalPluginsDir() |
java.io.File |
getGrailsWorkDir() |
java.io.File |
getProjectPluginsDir() |
java.io.File |
getProjectWorkDir() |
java.io.File |
getResourcesDir() |
java.util.List |
getRuntimeDependencies() |
java.io.File |
getTestClassesDir() |
java.util.List |
getTestDependencies() |
java.io.File |
getTestReportsDir() |
void |
setBuildDependencies(java.util.List dependencies) |
void |
setClassesDir(java.io.File dir) |
void |
setCompileDependencies(java.util.List dependencies) |
void |
setDependenciesExternallyConfigured(boolean b) |
void |
setGlobalPluginsDir(java.io.File dir) |
void |
setGrailsWorkDir(java.io.File dir) |
void |
setProjectPluginsDir(java.io.File dir) |
void |
setProjectWorkDir(java.io.File dir) |
void |
setResourcesDir(java.io.File dir) |
void |
setRuntimeDependencies(java.util.List dependencies) |
void |
setTestClassesDir(java.io.File dir) |
void |
setTestDependencies(java.util.List dependencies) |
void |
setTestReportsDir(java.io.File dir) |
public GrailsBuildHelper(java.lang.ClassLoader classLoader)
GrailsRootLoader.
You can try other class loaders, but you may run into problems.classLoader - The class loader that will be used to load Grails.public GrailsBuildHelper(java.lang.ClassLoader classLoader,
java.lang.String grailsHome)
GrailsRootLoader.
You can try other class loaders, but you may run into problems.classLoader - The class loader that will be used to load Grails.grailsHome - Location of a local Grails installation.public GrailsBuildHelper(java.lang.ClassLoader classLoader,
java.lang.String grailsHome,
java.lang.String baseDir)
public int execute(java.lang.String script)
script - The name of the script to execute, such as "Compile".public int execute(java.lang.String script,
java.lang.String args)
script - The name of the script to execute, such as "Compile".args - A single string containing the arguments for the
script, each argument separated by whitespace.public int execute(java.lang.String script,
java.lang.String args,
java.lang.String env)
script - The name of the script to execute, such as "Compile".args - A single string containing the arguments for the
script, each argument separated by whitespace.env - The name of the environment to run in, e.g. "development"
or "production".public java.io.File getGrailsWorkDir()
public void setGrailsWorkDir(java.io.File dir)
public java.io.File getProjectWorkDir()
public void setProjectWorkDir(java.io.File dir)
public java.io.File getClassesDir()
public void setClassesDir(java.io.File dir)
public java.io.File getTestClassesDir()
public void setTestClassesDir(java.io.File dir)
public java.io.File getResourcesDir()
public void setResourcesDir(java.io.File dir)
public java.io.File getProjectPluginsDir()
public void setProjectPluginsDir(java.io.File dir)
public java.io.File getGlobalPluginsDir()
public void setGlobalPluginsDir(java.io.File dir)
public java.io.File getTestReportsDir()
public void setTestReportsDir(java.io.File dir)
public java.util.List getCompileDependencies()
public void setCompileDependencies(java.util.List dependencies)
public void setBuildDependencies(java.util.List dependencies)
public void setDependenciesExternallyConfigured(boolean b)
public java.util.List getTestDependencies()
public void setTestDependencies(java.util.List dependencies)
public java.util.List getRuntimeDependencies()
public void setRuntimeDependencies(java.util.List dependencies)