|
Griffon 1.2.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.griffon.cli.support.GriffonBuildHelper
public class GriffonBuildHelper
Helper class that allows a client to bootstrap the Griffon build system in its own class loader. It basically uses reflection to handle the entry points to the build system: BuildSettings and GriffonScriptRunner. This ensures class loader isolation for Griffon.
Field Summary | |
---|---|
private ClassLoader |
classLoader
|
private Object |
settings
|
Constructor Summary | |
GriffonBuildHelper(ClassLoader classLoader)
Creates a helper that loads the Griffon build system with the given class loader. |
|
GriffonBuildHelper(ClassLoader classLoader, String griffonHome)
Creates a helper that loads the Griffon build system with the given class loader. |
|
GriffonBuildHelper(ClassLoader classLoader, String griffonHome, String baseDir)
|
Method Summary | |
---|---|
private Object
|
createScriptRunner()
|
int
|
execute(String script)
Executes the named Griffon script with no arguments. |
int
|
execute(String script, String args)
Executes the named Griffon script with the given arguments. |
int
|
execute(String script, String args, String env)
Executes the named Griffon script with the given arguments in the specified environment. |
File
|
getClassesDir()
|
List
|
getCompileDependencies()
|
File
|
getGriffonWorkDir()
|
File
|
getProjectPluginsDir()
|
File
|
getProjectWorkDir()
|
File
|
getResourcesDir()
|
List
|
getRuntimeDependencies()
|
File
|
getTestClassesDir()
|
List
|
getTestDependencies()
|
File
|
getTestReportsDir()
|
File
|
getTestResourcesDir()
|
private Object
|
invokeMethod(Object target, String name, Object[] args)
Invokes the named method on a target object using reflection. |
private Object
|
invokeMethod(Object target, String name, Class[] argTypes, Object[] args)
Invokes the named method on a target object using reflection. |
void
|
setClassesDir(File dir)
|
void
|
setCompileDependencies(List dependencies)
|
void
|
setDependenciesExternallyConfigured(boolean b)
|
void
|
setGriffonWorkDir(File dir)
|
void
|
setProjectPluginsDir(File dir)
|
void
|
setProjectWorkDir(File dir)
|
void
|
setResourcesDir(File dir)
|
void
|
setRuntimeDependencies(List dependencies)
|
void
|
setTestClassesDir(File dir)
|
void
|
setTestDependencies(List dependencies)
|
void
|
setTestReportsDir(File dir)
|
void
|
setTestResourcesDir(File dir)
|
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Field Detail |
---|
private ClassLoader classLoader
private Object settings
Constructor Detail |
---|
public GriffonBuildHelper(ClassLoader classLoader)
classLoader
- The class loader that will be used to load
Griffon.
public GriffonBuildHelper(ClassLoader classLoader, String griffonHome)
classLoader
- The class loader that will be used to load
Griffon.griffonHome
- Location of a local Griffon installation.
public GriffonBuildHelper(ClassLoader classLoader, String griffonHome, String baseDir)
Method Detail |
---|
private Object createScriptRunner()
public int execute(String script)
script
- The name of the script to execute, such as "Compile".
public int execute(String script, 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(String script, String args, 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 File getClassesDir()
public List getCompileDependencies()
public File getGriffonWorkDir()
public File getProjectPluginsDir()
public File getProjectWorkDir()
public File getResourcesDir()
public List getRuntimeDependencies()
public File getTestClassesDir()
public List getTestDependencies()
public File getTestReportsDir()
public File getTestResourcesDir()
private Object invokeMethod(Object target, String name, Object[] args)
target
- The object to call the method on.name
- The name of the method to call.args
- The arguments to pass to the method (may be an empty
array).
private Object invokeMethod(Object target, String name, Class[] argTypes, Object[] args)
target
- The object to call the method on.name
- The name of the method to call.argTypes
- The argument types declared by the method we
want to invoke (may be an empty array for a method that takes
no arguments).args
- The arguments to pass to the method (may be an empty
array).
public void setClassesDir(File dir)
public void setCompileDependencies(List dependencies)
public void setDependenciesExternallyConfigured(boolean b)
public void setGriffonWorkDir(File dir)
public void setProjectPluginsDir(File dir)
public void setProjectWorkDir(File dir)
public void setResourcesDir(File dir)
public void setRuntimeDependencies(List dependencies)
public void setTestClassesDir(File dir)
public void setTestDependencies(List dependencies)
public void setTestReportsDir(File dir)
public void setTestResourcesDir(File dir)
Groovy Documentation