Class StringTemplateMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.webguys.maven.plugin.st.StringTemplateMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="render") public class StringTemplateMojo extends org.apache.maven.plugin.AbstractMojo
Executes string template using a given controller.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private org.apache.maven.ProjectDependenciesResolver
    The Maven ProjectDependenciesResolver Object
    private org.apache.maven.plugin.BuildPluginManager
    The Maven PluginManager Object
    private org.apache.maven.project.MavenProject
    The Maven Project Object
    private org.apache.maven.execution.MavenSession
    The Maven Session Object
    private List<Template>
    The collection of templates to render.

    Fields inherited from interface org.apache.maven.plugin.Mojo

    ROLE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    private File
     

    Methods inherited from class org.apache.maven.plugin.AbstractMojo

    getLog, getPluginContext, setLog, setPluginContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • project

      @Component private org.apache.maven.project.MavenProject project
      The Maven Project Object
    • session

      @Component private org.apache.maven.execution.MavenSession session
      The Maven Session Object
    • pluginManager

      @Component private org.apache.maven.plugin.BuildPluginManager pluginManager
      The Maven PluginManager Object
    • dependenciesResolver

      @Component private org.apache.maven.ProjectDependenciesResolver dependenciesResolver
      The Maven ProjectDependenciesResolver Object
    • templates

      @Parameter(required=true) private List<Template> templates
      The collection of templates to render.
  • Constructor Details

    • StringTemplateMojo

      public StringTemplateMojo()
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException
    • getTemplateDirectory

      private File getTemplateDirectory(Template template)