net.sf.tomp.xtcl.ant
Class XtclTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by net.sf.tomp.xtcl.ant.XtclTask

public class XtclTask
extends org.apache.tools.ant.Task

Author:
tomp Ant task for executing XTCL from within Ant build files. Simply set the file and/or some other options such as 'quiet', 'uriResolver' etc.
Example of an build file using this new (xtcl) Ant task:
<project name="OwnTaskExample" default="main" basedir=".">
  <taskdef name="xtcl" classname="net.sf.tomp.xtcl.ant.XtclTask"/>
  <target name="main">
    <xtcl quiet="false" file="demo/echo.xcf"  fileAfter="demo/echo.xcf" resolvingReader="net.sf.tomp.xtcl.resolver.XTResolvingReader" uriResolver="net.sf.tomp.xtcl.resolver.XTResolver"/>
  </target>
  <target name="main">
    <xtcl scriptbefore="true" file="demo/echo.xcf" fileAfter="demo/echo.xcf">
        ECHO Hello!
    </xtcl>
  </target>
</project>
It will give:
Buildfile: build.xml

main:
     [xtcl] Echo!
     [xtcl] Echo!

Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
XtclTask()
           
 
Method Summary
 void addText(java.lang.String text)
           
 void execute()
          Executes the task.
 void setFile(java.io.File file)
           
 void setFileafter(java.io.File fileafter)
           
 void setIgnoreerrors(boolean g)
           
 void setQuiet(boolean quiet)
           
 void setResolvingReader(java.lang.Class resolvingReader)
           
 void setScriptbefore(boolean sb)
           
 void setUriResolver(java.lang.Class uriResolver)
           
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XtclTask

public XtclTask()
Method Detail

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Executes the task.

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException
See Also:
Task.execute()

setIgnoreerrors

public void setIgnoreerrors(boolean g)
Parameters:
sb - whether the script specified in the task body is to be executed before the scripts from file

setScriptbefore

public void setScriptbefore(boolean sb)
Parameters:
sb - whether the script specified in the task body is to be executed before the scripts from file

addText

public void addText(java.lang.String text)
Parameters:
text - The text of the script to be executed as if written on the command line

setFile

public void setFile(java.io.File file)
Parameters:
file - The file to set. The name of the XTCL (usually *.xcf) script file to be executed

setFileafter

public void setFileafter(java.io.File fileafter)
Parameters:
fileAfter - The file to set. The name of the XTCL (usually *.xcf) script file to be executed

setQuiet

public void setQuiet(boolean quiet)
Parameters:
quiet - The quiet to set. sets the non-verbose mode if set to true

setResolvingReader

public void setResolvingReader(java.lang.Class resolvingReader)
Parameters:
resolvingReader - The resolvingReader class to set. sets XMLResolvingReader class used to read XML resolving URIs

setUriResolver

public void setUriResolver(java.lang.Class uriResolver)
Parameters:
uriResolver - The uriResolver to set. sets URIResolver class to be used by JAXP