|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.ProjectComponent org.apache.tools.ant.Task org.apache.tools.ant.taskdefs.Java org.codehaus.groovy.ant.Groovy
public class Groovy extends org.apache.tools.ant.taskdefs.Java
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.
Method Summary | |
---|---|
protected void
|
addClassPathes(GroovyClassLoader classLoader)
Adds the class paths (if any) |
void
|
addFileset(org.apache.tools.ant.types.FileSet set)
Adds a set of files (nested fileset attribute). |
void
|
addText(java.lang.String txt)
Set an inline command to execute. |
org.apache.tools.ant.types.Commandline$Argument
|
createArg()
|
org.apache.tools.ant.types.Path
|
createClasspath()
Returns a new path element that can be configured. |
protected void
|
execGroovy(java.lang.String txt, java.io.PrintStream out)
Exec the statement. |
void
|
execute()
Load the file and then execute it |
org.apache.tools.ant.types.Path
|
getClasspath()
Gets the classpath. |
static void
|
main(java.lang.String[] args)
|
protected void
|
printResults(java.io.PrintStream out)
|
protected void
|
runStatements(java.io.Reader reader, java.io.PrintStream out)
|
void
|
setAppend(boolean append)
Whether output should be appended to or overwrite an existing file. |
void
|
setClasspath(org.apache.tools.ant.types.Path classpath)
Sets the classpath for loading. |
void
|
setClasspathRef(org.apache.tools.ant.types.Reference ref)
Set the classpath for loading using the classpath reference. |
void
|
setContextClassLoader(boolean contextClassLoader)
|
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
|
setOutput(java.io.File output)
Set the output file; optional, defaults to the Ant log. |
void
|
setSrc(java.io.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. |
Methods inherited from class org.apache.tools.ant.taskdefs.Java | |
---|---|
org.apache.tools.ant.taskdefs.Java#setOutput(java.io.File), org.apache.tools.ant.taskdefs.Java#setDir(java.io.File), org.apache.tools.ant.taskdefs.Java#setClasspath(org.apache.tools.ant.types.Path), org.apache.tools.ant.taskdefs.Java#setJvmargs(java.lang.String), org.apache.tools.ant.taskdefs.Java#setNewenvironment(boolean), org.apache.tools.ant.taskdefs.Java#addSysproperty(org.apache.tools.ant.types.Environment$Variable), org.apache.tools.ant.taskdefs.Java#addSyspropertyset(org.apache.tools.ant.types.PropertySet), org.apache.tools.ant.taskdefs.Java#createJvmarg(), org.apache.tools.ant.taskdefs.Java#setSpawn(boolean), org.apache.tools.ant.taskdefs.Java#setCloneVm(boolean), org.apache.tools.ant.taskdefs.Java#createBootclasspath(), org.apache.tools.ant.taskdefs.Java#setMaxmemory(java.lang.String), org.apache.tools.ant.taskdefs.Java#setFork(boolean), org.apache.tools.ant.taskdefs.Java#setArgs(java.lang.String), org.apache.tools.ant.taskdefs.Java#getCommandLine(), org.apache.tools.ant.taskdefs.Java#createClasspath(), org.apache.tools.ant.taskdefs.Java#setClasspathRef(org.apache.tools.ant.types.Reference), org.apache.tools.ant.taskdefs.Java#setClassname(java.lang.String), org.apache.tools.ant.taskdefs.Java#setJar(java.io.File), org.apache.tools.ant.taskdefs.Java#handleInput([B, int, int), org.apache.tools.ant.taskdefs.Java#setTimeout(java.lang.Long), org.apache.tools.ant.taskdefs.Java#clearArgs(), org.apache.tools.ant.taskdefs.Java#setErrorProperty(java.lang.String), org.apache.tools.ant.taskdefs.Java#executeJava(), org.apache.tools.ant.taskdefs.Java#setAppend(boolean), org.apache.tools.ant.taskdefs.Java#getSysProperties(), org.apache.tools.ant.taskdefs.Java#setInputString(java.lang.String), org.apache.tools.ant.taskdefs.Java#setLogError(boolean), org.apache.tools.ant.taskdefs.Java#setOutputproperty(java.lang.String), org.apache.tools.ant.taskdefs.Java#setJVMVersion(java.lang.String), org.apache.tools.ant.taskdefs.Java#addEnv(org.apache.tools.ant.types.Environment$Variable), org.apache.tools.ant.taskdefs.Java#createPermissions(), org.apache.tools.ant.taskdefs.Java#setResultProperty(java.lang.String), org.apache.tools.ant.taskdefs.Java#setJvm(java.lang.String), org.apache.tools.ant.taskdefs.Java#createArg(), org.apache.tools.ant.taskdefs.Java#setFailonerror(boolean), org.apache.tools.ant.taskdefs.Java#addAssertions(org.apache.tools.ant.types.Assertions), org.apache.tools.ant.taskdefs.Java#addConfiguredRedirector(org.apache.tools.ant.types.RedirectorElement), org.apache.tools.ant.taskdefs.Java#setError(java.io.File), org.apache.tools.ant.taskdefs.Java#setInput(java.io.File), org.apache.tools.ant.taskdefs.Java#execute(), org.apache.tools.ant.taskdefs.Java#getTaskName(), org.apache.tools.ant.taskdefs.Java#getTaskType(), org.apache.tools.ant.taskdefs.Java#setTaskType(java.lang.String), org.apache.tools.ant.taskdefs.Java#setTaskName(java.lang.String), org.apache.tools.ant.taskdefs.Java#getRuntimeConfigurableWrapper(), org.apache.tools.ant.taskdefs.Java#setRuntimeConfigurableWrapper(org.apache.tools.ant.RuntimeConfigurable), org.apache.tools.ant.taskdefs.Java#maybeConfigure(), org.apache.tools.ant.taskdefs.Java#getOwningTarget(), org.apache.tools.ant.taskdefs.Java#setOwningTarget(org.apache.tools.ant.Target), org.apache.tools.ant.taskdefs.Java#reconfigure(), org.apache.tools.ant.taskdefs.Java#perform(), org.apache.tools.ant.taskdefs.Java#bindToOwner(org.apache.tools.ant.Task), org.apache.tools.ant.taskdefs.Java#log(java.lang.String, java.lang.Throwable, int), org.apache.tools.ant.taskdefs.Java#log(java.lang.Throwable, int), org.apache.tools.ant.taskdefs.Java#log(java.lang.String), org.apache.tools.ant.taskdefs.Java#log(java.lang.String, int), org.apache.tools.ant.taskdefs.Java#init(), org.apache.tools.ant.taskdefs.Java#getProject(), org.apache.tools.ant.taskdefs.Java#setProject(org.apache.tools.ant.Project), org.apache.tools.ant.taskdefs.Java#clone(), org.apache.tools.ant.taskdefs.Java#getLocation(), org.apache.tools.ant.taskdefs.Java#setLocation(org.apache.tools.ant.Location), org.apache.tools.ant.taskdefs.Java#getDescription(), org.apache.tools.ant.taskdefs.Java#setDescription(java.lang.String), org.apache.tools.ant.taskdefs.Java#wait(long, int), org.apache.tools.ant.taskdefs.Java#wait(long), org.apache.tools.ant.taskdefs.Java#wait(), org.apache.tools.ant.taskdefs.Java#equals(java.lang.Object), org.apache.tools.ant.taskdefs.Java#toString(), org.apache.tools.ant.taskdefs.Java#hashCode(), org.apache.tools.ant.taskdefs.Java#getClass(), org.apache.tools.ant.taskdefs.Java#notify(), org.apache.tools.ant.taskdefs.Java#notifyAll() |
Methods inherited from class org.apache.tools.ant.Task | |
---|---|
org.apache.tools.ant.Task#getTaskName(), org.apache.tools.ant.Task#getTaskType(), org.apache.tools.ant.Task#setTaskType(java.lang.String), org.apache.tools.ant.Task#setTaskName(java.lang.String), org.apache.tools.ant.Task#getRuntimeConfigurableWrapper(), org.apache.tools.ant.Task#setRuntimeConfigurableWrapper(org.apache.tools.ant.RuntimeConfigurable), org.apache.tools.ant.Task#maybeConfigure(), org.apache.tools.ant.Task#getOwningTarget(), org.apache.tools.ant.Task#setOwningTarget(org.apache.tools.ant.Target), org.apache.tools.ant.Task#reconfigure(), org.apache.tools.ant.Task#perform(), org.apache.tools.ant.Task#bindToOwner(org.apache.tools.ant.Task), org.apache.tools.ant.Task#log(java.lang.String, java.lang.Throwable, int), org.apache.tools.ant.Task#log(java.lang.Throwable, int), org.apache.tools.ant.Task#log(java.lang.String), org.apache.tools.ant.Task#log(java.lang.String, int), org.apache.tools.ant.Task#init(), org.apache.tools.ant.Task#execute(), org.apache.tools.ant.Task#getProject(), org.apache.tools.ant.Task#setProject(org.apache.tools.ant.Project), org.apache.tools.ant.Task#clone(), org.apache.tools.ant.Task#getLocation(), org.apache.tools.ant.Task#setLocation(org.apache.tools.ant.Location), org.apache.tools.ant.Task#getDescription(), org.apache.tools.ant.Task#setDescription(java.lang.String), org.apache.tools.ant.Task#wait(long, int), org.apache.tools.ant.Task#wait(long), org.apache.tools.ant.Task#wait(), org.apache.tools.ant.Task#equals(java.lang.Object), org.apache.tools.ant.Task#toString(), org.apache.tools.ant.Task#hashCode(), org.apache.tools.ant.Task#getClass(), org.apache.tools.ant.Task#notify(), org.apache.tools.ant.Task#notifyAll() |
Method Detail |
---|
protected void addClassPathes(GroovyClassLoader classLoader)
classLoader
- the classloader to configure
public void addFileset(org.apache.tools.ant.types.FileSet set)
set
- the fileset representing source files
public void addText(java.lang.String txt)
txt
- the inline groovy ommands to execute
public org.apache.tools.ant.types.Commandline$Argument createArg()
public org.apache.tools.ant.types.Path createClasspath()
protected void execGroovy(java.lang.String txt, java.io.PrintStream out)
txt
- the groovy source to execout
- not used?
public void execute()
public org.apache.tools.ant.types.Path getClasspath()
public static void main(java.lang.String[] args)
protected void printResults(java.io.PrintStream out)
protected void runStatements(java.io.Reader reader, java.io.PrintStream out)
public void setAppend(boolean append)
append
- set to true to append
public void setClasspath(org.apache.tools.ant.types.Path classpath)
classpath
- The classpath to set
public void setClasspathRef(org.apache.tools.ant.types.Reference ref)
ref
- the refid to use
public void setContextClassLoader(boolean contextClassLoader)
public void setFork(boolean fork)
fork
- true if the script should be executed in a forked process
public void setIncludeAntRuntime(boolean includeAntRuntime)
includeAntRuntime
- true if the system classpath should be on the classpath
public void setOutput(java.io.File output)
output
- the output file
public void setSrc(java.io.File srcFile)
srcFile
- the file containing the groovy script to execute
public void setStacktrace(boolean stacktrace)
stacktrace
- set to true to enable stacktrace reporting
public void setUseGroovyShell(boolean useGroovyShell)
useGroovyShell
- true if GroovyShell should be used to run the script directly
Groovy Documentation