org.apache.maven.plugin.checkstyle
public class VelocityTemplate extends Object
A component to work with VelocityTemplates from within plugins.
You will need to reference the velocity component as a parameter in your plugin. Like this:/** * Velocity Component * @parameter expression="${component.org.codehaus.plexus.velocity.VelocityComponent}" * @readonly */ private VelocityComponent velocity;
Constructor Summary | |
---|---|
VelocityTemplate(VelocityComponent velocityComponent, String templateBaseDirectory) |
Method Summary | |
---|---|
void | generate(String outputFilename, String template, Context context)
Using a specified Velocity Template and provided context, create the outputFilename.
|
Log | getLog() |
String | getTemplateDirectory() |
VelocityComponent | getVelocity() |
void | setLog(Log log) |
void | setTemplateDirectory(String templateDirectory) |
void | setVelocity(VelocityComponent velocity) |
Parameters: outputFilename the file to be generated. template the velocity template to use. context the velocity context map.
Throws: ResourceNotFoundException if the template was not found. VelocityException if the MojoExecutionException IOException