Package org.apache.velocity.anakia
Class AnakiaTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.MatchingTask
org.apache.velocity.anakia.AnakiaTask
- All Implemented Interfaces:
Cloneable,org.apache.tools.ant.types.selectors.SelectorContainer
public class AnakiaTask
extends org.apache.tools.ant.taskdefs.MatchingTask
The purpose of this Ant Task is to allow you to use
Velocity as an XML transformation tool like XSLT is.
So, instead of using XSLT, you will be able to use this
class instead to do your transformations. It works very
similar in concept to Ant's <style> task.
You can find more documentation about this class on the Velocity Website.
- Version:
- $Id: AnakiaTask.java 501574 2007-01-30 21:32:26Z henning $
- Author:
- Jon S. Stevens, Attila Szegedi
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassA context implementation that loads all values from an XML file. -
Field Summary
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
filesetFields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapperFields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a new context.voidexecute()Main body of the applicationvoidsetBasedir(File dir) Set the base directory.voidsetDestdir(File dir) Set the destination directory into which the VSL result files should be copied tovoidsetExtension(String extension) Allow people to set the default output file extensionvoidsetLastModifiedCheck(String lastmod) Turn on/off last modified checking.voidsetProjectFile(String projectAttribute) Allow people to set the path to the project.xml filevoidAllow people to set the path to the .vsl filevoidsetTemplatePath(File templatePath) Set the path to the templates.voidsetVelocityPropertiesFile(File velocityPropertiesFile) Allow people to set the path to the velocity.properties file This file is found relative to the path where the JVM was run.Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask
add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItemsMethods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation
-
Constructor Details
-
AnakiaTask
public AnakiaTask()Constructor creates the SAXBuilder.
-
-
Method Details
-
setBasedir
Set the base directory.- Parameters:
dir-
-
setDestdir
Set the destination directory into which the VSL result files should be copied to- Parameters:
dir- the name of the destination directory
-
setExtension
Allow people to set the default output file extension- Parameters:
extension-
-
setStyle
Allow people to set the path to the .vsl file- Parameters:
style-
-
setProjectFile
Allow people to set the path to the project.xml file- Parameters:
projectAttribute-
-
setTemplatePath
Set the path to the templates. The way it works is this: If you have a Velocity.properties file defined, this method will override whatever is set in the Velocity.properties file. This allows one to not have to define a Velocity.properties file, therefore using Velocity's defaults only.- Parameters:
templatePath-
-
setVelocityPropertiesFile
Allow people to set the path to the velocity.properties file This file is found relative to the path where the JVM was run. For example, if build.sh was executed in the ./build directory, then the path would be relative to this directory. This is optional based on the setting of setTemplatePath().- Parameters:
velocityPropertiesFile-
-
setLastModifiedCheck
Turn on/off last modified checking. by default, it is on.- Parameters:
lastmod-
-
execute
public void execute() throws org.apache.tools.ant.BuildExceptionMain body of the application- Overrides:
executein classorg.apache.tools.ant.Task- Throws:
org.apache.tools.ant.BuildException
-
createContext
Create a new context.- Returns:
- A new context.
-