|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.cli.support.GrailsBuildHelper
public class GrailsBuildHelper extends java.lang.Object
Helper class that allows a client to bootstrap the Grails build system in its own class loader. It basically uses reflection to handle the entry points to the build system: BuildSettings and GrailsScriptRunner. This ensures class loader isolation for Grails.
Constructor Summary | |
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)
|
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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() |
Constructor Detail |
---|
public GrailsBuildHelper(java.lang.ClassLoader classLoader)
classLoader
- The class loader that will be used to load Grails.
public GrailsBuildHelper(java.lang.ClassLoader classLoader, java.lang.String grailsHome)
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)
Method Detail |
---|
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 getClassesDir()
return (List) invokeMethod(settings, "getCompileDependencies", new Object[0]); public java.util.List getCompileDependencies()
public java.io.File getGlobalPluginsDir()
public java.io.File getGrailsWorkDir()
public java.io.File getProjectPluginsDir()
public java.io.File getProjectWorkDir()
public java.io.File getResourcesDir()
return (List) invokeMethod(settings, "getRuntimeDependencies", new Object[0]); public java.util.List getRuntimeDependencies()
public java.io.File getTestClassesDir()
return (List) invokeMethod(settings, "getTestDependencies", new Object[0]); public java.util.List getTestDependencies()
public java.io.File getTestReportsDir()
invokeMethod(settings, "setBuildDependencies", new Class[] { List.class }, new Object[] { dependencies }); public void setBuildDependencies(java.util.List dependencies)
public void setClassesDir(java.io.File dir)
invokeMethod(settings, "setCompileDependencies", new Class[] { List.class }, new Object[] { dependencies }); public void setCompileDependencies(java.util.List dependencies)
public void setDependenciesExternallyConfigured(boolean b)
public void setGlobalPluginsDir(java.io.File dir)
public void setGrailsWorkDir(java.io.File dir)
public void setProjectPluginsDir(java.io.File dir)
public void setProjectWorkDir(java.io.File dir)
public void setResourcesDir(java.io.File dir)
invokeMethod(settings, "setRuntimeDependencies", new Class[] { List.class }, new Object[] { dependencies }); public void setRuntimeDependencies(java.util.List dependencies)
public void setTestClassesDir(java.io.File dir)
invokeMethod(settings, "setTestDependencies", new Class[] { List.class }, new Object[] { dependencies }); public void setTestDependencies(java.util.List dependencies)
public void setTestReportsDir(java.io.File dir)
Groovy Documentation