@Deprecated public class VelocityTemplate extends Object
A component to work with Velocity templates from within plugins.
You will need to reference the velocity component as a parameter in your plugin. Like this:
/** * Velocity Component * @component */ private VelocityComponent velocity;
Constructor and Description |
---|
VelocityTemplate(org.codehaus.plexus.velocity.VelocityComponent velocityComponent,
String templateBaseDirectory)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
generate(String outputFilename,
String template,
org.apache.velocity.context.Context context)
Deprecated.
Using a specified Velocity Template and provided context, create the outputFilename.
|
org.apache.maven.plugin.logging.Log |
getLog()
Deprecated.
|
String |
getTemplateDirectory()
Deprecated.
|
org.codehaus.plexus.velocity.VelocityComponent |
getVelocity()
Deprecated.
|
void |
setLog(org.apache.maven.plugin.logging.Log log)
Deprecated.
|
void |
setTemplateDirectory(String templateDirectory)
Deprecated.
|
void |
setVelocity(org.codehaus.plexus.velocity.VelocityComponent velocity)
Deprecated.
|
public VelocityTemplate(org.codehaus.plexus.velocity.VelocityComponent velocityComponent, String templateBaseDirectory)
public String getTemplateDirectory()
public org.codehaus.plexus.velocity.VelocityComponent getVelocity()
public void generate(String outputFilename, String template, org.apache.velocity.context.Context context) throws org.apache.velocity.exception.VelocityException, org.apache.maven.plugin.MojoExecutionException, IOException
outputFilename
- the file to be generated.template
- the velocity template to usecontext
- the velocity context maporg.apache.velocity.exception.VelocityException
- if the template was not found or any other Velocity exceptionorg.apache.maven.plugin.MojoExecutionException
- if merging the velocity template failedIOException
- if there was an error writing to the output filepublic void setTemplateDirectory(String templateDirectory)
public void setVelocity(org.codehaus.plexus.velocity.VelocityComponent velocity)
public org.apache.maven.plugin.logging.Log getLog()
public void setLog(org.apache.maven.plugin.logging.Log log)
Copyright © 2005–2023 The Apache Software Foundation. All rights reserved.