redirector, redirectorElement
description, location, project
Constructor and Description |
---|
Groovy() |
Modifier and Type | Method and Description |
---|---|
protected void |
addClassPathes(GroovyClassLoader classLoader)
Adds the class paths (if any)
|
void |
addFileset(FileSet set)
Adds a set of files (nested fileset attribute).
|
void |
addText(String txt)
Set an inline command to execute.
|
Commandline.Argument |
createArg() |
Path |
createClasspath()
Returns a new path element that can be configured.
|
protected void |
execGroovy(String txt,
PrintStream out)
Exec the statement.
|
void |
execute()
Load the file and then execute it
|
Path |
getClasspath()
Gets the classpath.
|
static void |
main(String[] args) |
protected void |
printResults(PrintStream out)
print any results in the statement.
|
protected void |
runStatements(Reader reader,
PrintStream out)
Read in lines and execute them.
|
void |
setAppend(boolean append)
Whether output should be appended to or overwrite
an existing file.
|
void |
setClasspath(Path classpath)
Sets the classpath for loading.
|
void |
setClasspathRef(Reference ref)
Set the classpath for loading
using the classpath reference.
|
void |
setConfigscript(String configscript)
Sets the configuration script for the groovy compiler configuration.
|
void |
setContextClassLoader(boolean contextClassLoader)
Setting to true will cause the contextClassLoader to be set with
the classLoader of the shell used to run the script.
|
void |
setFork(boolean fork)
Should the script be executed using a forked process.
|
void |
setIncludeAntRuntime(boolean includeAntRuntime)
Should the system classpath be included on the classpath when forking.
|
void |
setIndy(boolean indy)
Sets the indy flag to enable or disable invokedynamic
|
void |
setOutput(File output)
Set the output file;
optional, defaults to the Ant log.
|
void |
setScriptBaseClass(String scriptBaseClass)
Set the script base class name
|
void |
setSrc(File srcFile)
Set the name of the file to be run.
|
void |
setStacktrace(boolean stacktrace)
Enable compiler to report stack trace information if a problem occurs
during compilation.
|
void |
setUseGroovyShell(boolean useGroovyShell)
Should a new GroovyShell be used when forking.
|
addAssertions, addConfiguredRedirector, addEnv, addSysproperty, addSyspropertyset, checkConfiguration, clearArgs, createBootclasspath, createJvmarg, createPermissions, createWatchdog, executeJava, executeJava, getCommandLine, getSysProperties, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, maybeSetResultPropertyValue, run, setArgs, setClassname, setCloneVm, setDir, setError, setErrorProperty, setFailonerror, setInput, setInputString, setJar, setJvm, setJvmargs, setJVMVersion, setLogError, setMaxmemory, setNewenvironment, setOutputproperty, setResultProperty, setSpawn, setTimeout, setupRedirector
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
public void setFork(boolean fork)
public void setUseGroovyShell(boolean useGroovyShell)
useGroovyShell
- true if GroovyShell should be used to run the script directlypublic void setIncludeAntRuntime(boolean includeAntRuntime)
includeAntRuntime
- true if the system classpath should be on the classpathpublic void setStacktrace(boolean stacktrace)
stacktrace
- set to true to enable stacktrace reportingpublic void setSrc(File srcFile)
srcFile
- the file containing the groovy script to executepublic void addText(String txt)
txt
- the inline groovy commands to executepublic void addFileset(FileSet set)
set
- the fileset representing source filespublic void setOutput(File output)
public void setAppend(boolean append)
public void setClasspath(Path classpath)
setClasspath
in class Java
classpath
- The classpath to setpublic Path createClasspath()
createClasspath
in class Java
public void setClasspathRef(Reference ref)
setClasspathRef
in class Java
ref
- the refid to usepublic Path getClasspath()
public void setConfigscript(String configscript)
configscript
- path to the configuration scriptpublic void setIndy(boolean indy)
indy
- true means invokedynamic support is activepublic void setScriptBaseClass(String scriptBaseClass)
scriptBaseClass
- the name of the base class for scriptspublic void execute() throws BuildException
execute
in class Java
BuildException
public Commandline.Argument createArg()
protected void runStatements(Reader reader, PrintStream out) throws IOException
reader
- the reader from which to get the groovy source to execout
- the outputstream to useIOException
- if something goes wrongprotected void execGroovy(String txt, PrintStream out)
txt
- the groovy source to execout
- not used?public static void main(String[] args)
protected void addClassPathes(GroovyClassLoader classLoader)
classLoader
- the classloader to configureprotected void printResults(PrintStream out)
out
- the output PrintStream to print topublic void setContextClassLoader(boolean contextClassLoader)
contextClassLoader
- set to true to set the context classloader