Save This Page
Home » Groovy-1.7.0 » org.codehaus » groovy » ant » [javadoc | source]
org.codehaus.groovy.ant
public class: Groovy [javadoc | source]
java.lang.Object
   org.apache.tools.ant.ProjectComponent
      org.apache.tools.ant.Task
         org.apache.tools.ant.taskdefs.Java
            org.codehaus.groovy.ant.Groovy

All Implemented Interfaces:
    Cloneable

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.

Fields inherited from org.apache.tools.ant.taskdefs.Java:
redirector,  redirectorElement
Fields inherited from org.apache.tools.ant.Task:
target,  taskName,  taskType,  wrapper
Fields inherited from org.apache.tools.ant.ProjectComponent:
project,  location,  description
Method from org.codehaus.groovy.ant.Groovy Summary:
addClassPathes,   addFileset,   addText,   createArg,   createClasspath,   execGroovy,   execute,   getClasspath,   main,   printResults,   runStatements,   setAppend,   setClasspath,   setClasspathRef,   setFork,   setIncludeAntRuntime,   setOutput,   setSrc,   setStacktrace,   setUseGroovyShell
Methods from org.apache.tools.ant.taskdefs.Java:
addAssertions,   addConfiguredRedirector,   addEnv,   addSysproperty,   addSyspropertyset,   clearArgs,   createArg,   createBootclasspath,   createClasspath,   createJvmarg,   createPermissions,   createWatchdog,   execute,   executeJava,   getCommandLine,   getSysProperties,   handleErrorFlush,   handleErrorOutput,   handleFlush,   handleInput,   handleOutput,   maybeSetResultPropertyValue,   run,   setAppend,   setArgs,   setClassname,   setClasspath,   setClasspathRef,   setCloneVm,   setDir,   setError,   setErrorProperty,   setFailonerror,   setFork,   setInput,   setInputString,   setJVMVersion,   setJar,   setJvm,   setJvmargs,   setLogError,   setMaxmemory,   setNewenvironment,   setOutput,   setOutputproperty,   setResultProperty,   setSpawn,   setTimeout,   setupRedirector
Methods from org.apache.tools.ant.Task:
bindToOwner,   execute,   getOwningTarget,   getRuntimeConfigurableWrapper,   getTaskName,   getTaskType,   getWrapper,   handleErrorFlush,   handleErrorOutput,   handleFlush,   handleInput,   handleOutput,   init,   isInvalid,   log,   log,   log,   log,   markInvalid,   maybeConfigure,   perform,   reconfigure,   setOwningTarget,   setRuntimeConfigurableWrapper,   setTaskName,   setTaskType
Methods from org.apache.tools.ant.ProjectComponent:
clone,   getDescription,   getLocation,   getProject,   log,   log,   setDescription,   setLocation,   setProject
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.codehaus.groovy.ant.Groovy Detail:
 protected  void addClassPathes(GroovyClassLoader classLoader) 
    Adds the class pathes (if any)
 public  void addFileset(FileSet set) 
    Adds a set of files (nested fileset attribute).
 public  void addText(String txt) 
    Set an inline command to execute. NB: Properties are not expanded in this text.
 public Argument createArg() 
 public Path createClasspath() 
    Returns a new path element that can be configured. Gets called for instance by Ant when it encounters a nested <classpath> element.
 protected  void execGroovy(String txt,
    PrintStream out) 
    Exec the statement.
 public  void execute() throws BuildException 
    Load the file and then execute it
 public Path getClasspath() 
    Gets the classpath.
 public static  void main(String[] args) 
 protected  void printResults(PrintStream out) 
    print any results in the statement.
 protected  void runStatements(Reader reader,
    PrintStream out) throws IOException 
    Read in lines and execute them.
 public  void setAppend(boolean append) 
    Whether output should be appended to or overwrite an existing file. Defaults to false.
 public  void setClasspath(Path classpath) 
    Sets the classpath for loading.
 public  void setClasspathRef(Reference ref) 
    Set the classpath for loading using the classpath reference.
 public  void setFork(boolean fork) 
    Should the script be executed using a forked process. Defaults to false.
 public  void setIncludeAntRuntime(boolean includeAntRuntime) 
    Should the system classpath be included on the classpath when forking. Defaults to true.
 public  void setOutput(File output) 
    Set the output file; optional, defaults to the Ant log.
 public  void setSrc(File srcFile) 
    Set the name of the file to be run. The folder of the file is automatically added to the classpath. Required unless statements are enclosed in the build file
 public  void setStacktrace(boolean stacktrace) 
    Enable compiler to report stack trace information if a problem occurs during compilation.
 public  void setUseGroovyShell(boolean useGroovyShell) 
    Should a new GroovyShell be used when forking. Special variables won't be available but you don't need Ant in the classpath.