Module gg.jte.maven
Package gg.jte.maven

Class CompilerMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
gg.jte.maven.CompilerMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="precompile", defaultPhase=PROCESS_CLASSES, requiresDependencyResolution=COMPILE, threadSafe=true) public class CompilerMojo extends org.apache.maven.plugin.AbstractMojo
  • Field Details

    • sourceDirectory

      @Parameter(required=true) public String sourceDirectory
      The directory where template files are located
    • targetDirectory

      @Parameter(required=true) public String targetDirectory
      The directory where compiled classes should be written to
    • compilePath

      @Parameter(defaultValue="${project.compileClasspathElements}", required=true) public List<String> compilePath
      The compile-classpath to use. Defaults to project.compileClasspathElements
    • contentType

      @Parameter(required=true) public String contentType
      The content type of all templates. Either Plain or Html.
    • trimControlStructures

      @Parameter public boolean trimControlStructures
      Trims control structures, resulting in prettier output.
    • htmlTags

      @Parameter public String[] htmlTags
      Intercepts the given html tags during template compilation and calls the configured htmlInterceptor during template rendering.
    • htmlPolicyClass

      @Parameter public String htmlPolicyClass
      Policy class that checks the parsed HTML at compile time. Must be an instance of HtmlPolicy
    • htmlCommentsPreserved

      @Parameter public boolean htmlCommentsPreserved
      By default, jte omits all HTML/CSS/JS comments, when compiling with ContentType.Html. If you don't want this behavior, you can disable it here.
    • binaryStaticContent

      @Parameter public boolean binaryStaticContent
      Setting, that UTF-8 encodes all static template parts at compile time. Only makes sense if you use a binary output, like Utf8ByteOutput.
    • compileArgs

      @Parameter public String[] compileArgs
      Sets additional compiler arguments for jte templates.
    • packageName

      @Parameter public String packageName
      The package name, where template classes are generated to.
    • keepGeneratedSourceFiles

      @Parameter public boolean keepGeneratedSourceFiles
      By default, this plugin deletes all generated jte source files after compilation. If you want to keep them, set this property to true.
  • Constructor Details

    • CompilerMojo

      public CompilerMojo()
  • Method Details

    • execute

      public void execute()