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

Class GeneratorMojo

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

@Mojo(name="generate", defaultPhase=GENERATE_SOURCES, threadSafe=true) public class GeneratorMojo extends org.apache.maven.plugin.AbstractMojo
  • Field Details

    • project

      @Parameter(defaultValue="${project}") public org.apache.maven.project.MavenProject project
    • sourceDirectory

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

      @Parameter(defaultValue="${project.build.directory}/generated-sources/jte") public String targetDirectory
      Destination directory to store generated templates. Defaults to 'target/generated-sources/jte'.
    • 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.
    • 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.
    • packageName

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

      @Parameter public String targetResourceDirectory
      Directory in which to generate non-java files (resources). Typically, set by plugin rather than end user. Optional - if null, resources will not be generated
    • extensions

      @Parameter public List<ExtensionSettings> extensions
      Optional - Extensions this template engine should load. Currently, the following extensions exist:
      • gg.jte.models.generator.ModelExtension
      • gg.jte.nativeimage.NativeResourcesExtension
  • Constructor Details

    • GeneratorMojo

      public GeneratorMojo()
  • Method Details

    • execute

      public void execute()