|
|||||
FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Executes a series of Groovy statements.
Statements can either be read in from a text file using the src attribute or from between the enclosing groovy tags.
Field Summary | |
---|---|
boolean |
append
|
Path |
classpath
|
Commandline |
cmdline
|
String |
command
|
CompilerConfiguration |
configuration
|
Vector |
filesets
|
LoggingHelper |
log
|
File |
output
|
File |
srcFile
|
Constructor Summary | |
Groovy()
|
Method Summary | |
---|---|
void |
addClassPathes(GroovyClassLoader classLoader)
Adds the class pathes (if any) |
void |
addFileset(FileSet set)
Adds a set of files (nested fileset attribute). |
void |
addText(String txt)
Set an inline command to execute. |
String |
computeScriptName()
Try to build a script name for the script of the groovy task to have an helpful value in stack traces in case of exception |
def |
createArg()
|
Path |
createClasspath()
Returns a new path element that can be configured. |
void |
execGroovy(String txt, PrintStream out)
Exec the statement. |
void |
execute()
Load the file and then execute it |
Path |
getClasspath()
Gets the classpath. |
static String |
getText(BufferedReader reader)
|
void |
printResults(PrintStream out)
print any results in the statement. |
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 |
setOutput(File output)
Set the output file; optional, defaults to the Ant log. |
void |
setSrc(File srcFile)
Set the name of the file to be run. |
void |
setStacktrace(boolean stacktrace)
files to load |
Constructor Detail |
---|
Groovy()
Method Detail |
---|
void addClassPathes(GroovyClassLoader classLoader)
public void addFileset(FileSet set)
public void addText(String txt)
String computeScriptName()
public def createArg()
public Path createClasspath()
void execGroovy(String txt, PrintStream out)
public void execute()
public Path getClasspath()
static String getText(BufferedReader reader)
void printResults(PrintStream out)
void runStatements(Reader reader, PrintStream out)
public void setAppend(boolean append)
public void setClasspath(Path classpath)
public void setClasspathRef(Reference ref)
public void setOutput(File output)
public void setSrc(File srcFile)
public void setStacktrace(boolean stacktrace)