An ant task for generating output by using Velocity
author: Jason van Zyl author: Robert Burrell Donkin version: $Id: TexenTask.java 463298 2006-10-12 16:10:32Z henning $
useResourceLoaderCache Property which controls whether the resource
loader will be told to cache.
Method Summary
protected void
cleanup() A hook method called at the end of
TexenTask.execute() which can
be overridden to perform any necessary cleanup activities (such
as the release of database connections, etc.).
These are properties that are fed into the
initial context from a properties file. This
is simply a convenient way to set some values
that you wish to make available in the context.
These values are not critical, like the template path
or output path, but allow a convenient way to
set a value that may be specific to a particular
generation task.
For example, if you are generating scripts to allow
user to automatically create a database, then
you might want the $databaseName
to be placed
in the initial context so that it is available
in a script that might look something like the
following:
#!bin/sh
echo y | mysqladmin create $databaseName
The value of $databaseName isn't critical to
output, and you obviously don't want to change
the ant task to simply take a database name.
So initial context values can be set with
properties file.
A hook method called at the end of
TexenTask.execute() which can
be overridden to perform any necessary cleanup activities (such
as the release of database connections, etc.). By default,
does nothing.
exception: Exception - Problem cleaning up.
Execute the input script with Velocity
throws: BuildException - BuildExceptions are thrown when required attributes are missing.Exceptions thrown by Velocity are rethrown as BuildExceptions.
getContextProperties
public ExtendedProperties getContextProperties()(Code)
Get the context properties that will be
fed into the initial context be the
generating process starts.
The current context properties.