org.apache.velocity.anakia
public class AnakiaTask extends org.apache.tools.ant.taskdefs.MatchingTask
You can find more documentation about this class on the Velocity Website.
Modifier and Type | Field and Description |
---|---|
private java.io.File |
baseDir
the base directory
|
private org.jdom.input.SAXBuilder |
builder
instance to use |
private java.io.File |
destDir
the destination directory
|
private java.lang.String |
extension
the default output extension is .html
|
private boolean |
lastModifiedCheck
check the last modified date on files.
|
private java.lang.String |
projectAttribute
the projectFile= attribute
|
private java.io.File |
projectFile
the File for the project.xml file
|
private long |
projectFileLastModified
last modified of the project file if it exists
|
private java.lang.String |
style
the style= attribute
|
private java.io.File |
styleFile
the File to the style file
|
private long |
styleSheetLastModified
last modified of the style sheet
|
private java.lang.String |
templatePath
the template path
|
private VelocityEngine |
ve
the VelocityEngine instance to use
|
private java.io.File |
velocityPropertiesFile
the file to get the velocity properties file
|
Constructor and Description |
---|
AnakiaTask()
Constructor creates the SAXBuilder.
|
Modifier and Type | Method and Description |
---|---|
private void |
ensureDirectoryFor(java.io.File targetFile)
create directories as needed
|
void |
execute()
Main body of the application
|
private java.lang.String |
getRelativePath(java.lang.String file)
Hacky method to figure out the relative path
that we are currently in.
|
private void |
process(java.io.File baseDir,
java.lang.String xmlFile,
java.io.File destDir,
org.jdom.Document projectDocument)
Process an XML file using Velocity
|
void |
setBasedir(java.io.File dir)
Set the base directory.
|
void |
setDestdir(java.io.File dir)
Set the destination directory into which the VSL result
files should be copied to
|
void |
setExtension(java.lang.String extension)
Allow people to set the default output file extension
|
void |
setLastModifiedCheck(java.lang.String lastmod)
Turn on/off last modified checking.
|
void |
setProjectFile(java.lang.String projectAttribute)
Allow people to set the path to the project.xml file
|
void |
setStyle(java.lang.String style)
Allow people to set the path to the .vsl file
|
void |
setTemplatePath(java.io.File templatePath)
Set the path to the templates.
|
void |
setVelocityPropertiesFile(java.io.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.
|
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, XsetItems
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
private org.jdom.input.SAXBuilder builder
SAXBuilder
instance to useprivate java.io.File destDir
private java.io.File baseDir
private java.lang.String style
private java.io.File styleFile
private long styleSheetLastModified
private java.lang.String projectAttribute
private java.io.File projectFile
private long projectFileLastModified
private boolean lastModifiedCheck
private java.lang.String extension
private java.lang.String templatePath
private java.io.File velocityPropertiesFile
private VelocityEngine ve
public void setBasedir(java.io.File dir)
public void setDestdir(java.io.File dir)
dirName
- the name of the destination directorypublic void setExtension(java.lang.String extension)
public void setStyle(java.lang.String style)
public void setProjectFile(java.lang.String projectAttribute)
public void setTemplatePath(java.io.File templatePath)
public void setVelocityPropertiesFile(java.io.File velocityPropertiesFile)
public void setLastModifiedCheck(java.lang.String lastmod)
public void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
private void process(java.io.File baseDir, java.lang.String xmlFile, java.io.File destDir, org.jdom.Document projectDocument) throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
private java.lang.String getRelativePath(java.lang.String file)
private void ensureDirectoryFor(java.io.File targetFile) throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
Copyright ? 2002 Apache Software Foundation. All Rights Reserved.