Package com.webguys.maven.plugin.st
Class Template
- java.lang.Object
-
- com.webguys.maven.plugin.st.Template
-
public class Template extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private Controller
controller
The class to invoke to provide data for the template.private java.io.File
directory
The path to the template file's parent directory.private java.lang.String
name
The name of the template file to render.private java.util.Map<java.lang.String,java.lang.String>
properties
The static properties to be provided to the template.private java.io.File
target
The path to the output file.
-
Constructor Summary
Constructors Constructor Description Template()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.File
getDirectory()
java.lang.String
getName()
void
installProperties(org.stringtemplate.v4.ST st)
void
invokeController(org.stringtemplate.v4.ST st, org.twdata.maven.mojoexecutor.MojoExecutor.ExecutionEnvironment executionEnvironment, org.apache.maven.ProjectDependenciesResolver dependenciesResolver, org.apache.maven.plugin.logging.Log log)
private void
prepareCompilerSourceRoot(java.io.File file, org.apache.maven.project.MavenProject project, org.apache.maven.plugin.logging.Log log)
private java.io.File
prepareOutputFile(java.io.File baseDirectory)
void
render(org.stringtemplate.v4.ST st, org.apache.maven.project.MavenProject project, org.apache.maven.plugin.logging.Log log)
-
-
-
Field Detail
-
directory
private java.io.File directory
The path to the template file's parent directory.
-
name
private java.lang.String name
The name of the template file to render.
-
target
private java.io.File target
The path to the output file.
-
controller
private Controller controller
The class to invoke to provide data for the template.
-
properties
private java.util.Map<java.lang.String,java.lang.String> properties
The static properties to be provided to the template.
-
-
Method Detail
-
getDirectory
public java.io.File getDirectory()
-
getName
public java.lang.String getName()
-
invokeController
public void invokeController(org.stringtemplate.v4.ST st, org.twdata.maven.mojoexecutor.MojoExecutor.ExecutionEnvironment executionEnvironment, org.apache.maven.ProjectDependenciesResolver dependenciesResolver, org.apache.maven.plugin.logging.Log log) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
installProperties
public void installProperties(org.stringtemplate.v4.ST st)
-
render
public void render(org.stringtemplate.v4.ST st, org.apache.maven.project.MavenProject project, org.apache.maven.plugin.logging.Log log) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
prepareOutputFile
private java.io.File prepareOutputFile(java.io.File baseDirectory) throws org.apache.maven.plugin.MojoExecutionException, java.io.IOException
- Throws:
org.apache.maven.plugin.MojoExecutionException
java.io.IOException
-
prepareCompilerSourceRoot
private void prepareCompilerSourceRoot(java.io.File file, org.apache.maven.project.MavenProject project, org.apache.maven.plugin.logging.Log log)
-
-