Class Template

java.lang.Object
com.webguys.maven.plugin.st.Template

public class Template extends Object
  • Field Details

    • directory

      private File directory
      The path to the template file's parent directory.
    • name

      private String name
      The name of the template file to render.
    • target

      private File target
      The path to the output file.
    • controller

      private Controller controller
      The class to invoke to provide data for the template.
    • properties

      private Map<String,String> properties
      The static properties to be provided to the template.
  • Constructor Details

    • Template

      public Template()
  • Method Details

    • getDirectory

      public File getDirectory()
    • getName

      public 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 File prepareOutputFile(File baseDirectory) throws org.apache.maven.plugin.MojoExecutionException, IOException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      IOException
    • prepareCompilerSourceRoot

      private void prepareCompilerSourceRoot(File file, org.apache.maven.project.MavenProject project, org.apache.maven.plugin.logging.Log log)