freemarker:freemarker

Full name:

org.microbean:freemarker-maven-plugin:0.6.9:freemarker

Description:

Generates a document from a Freemarker template.

Attributes:

  • Requires a Maven project to be executed.

Optional Parameters

Name Type Since Description
configuration Configuration - The Configuration representing the Freemarker template engine.
dataModel Map - A Map of Strings to arbitrary Objects that will be made available in the Freemarker template's context.

The data model will contain the following "top-level" template-accessible variables by default, unless the user-supplied data model has values indexed under these keys:

enums
An object providing access to enums, indexed by classname.
statics
An object providing access to static methods and fields, indexed by classname.
classIndex
A Jandex IndexView providing access to all known classes and annotations; see the jandexIndexFile parameter documentation for details.
project
The MavenProject instance in effect during this goal's execution.
classes
A load-on-demand map of Class instances loadable from the context classloader.
contextClassLoader
The context classloader in effect during this goal's execution.

jandexIndexFile File - A File representing where the (optional) Jandex index exists, providing efficient access to classes and annotations produced by the project of which this plugin execution is a part.
Default value is: ${project.build.outputDirectory}/META-INF/jandex.idx.
User property is: freemarker.jandexIndexFile.
modelFactories Map - A Map of ModelFactory instances indexed by the names of classes for which they are suitable.
outputEncoding String - The character encoding to use when reading Freemarker templates.
Default value is: ${project.build.outputEncoding}.
outputFile File - The full path to the file that results from processing the template given by the templateName parameter, or, if the templateName parameter is omitted, the full path to the directory that will contain general template processing output. If the templateName parameter is supplied, but this parameter is omitted, a path consisting of ${project.build.directory}/ concatenated with the value of the templateName parameter minus its .ftl suffix, if any, will be used for this parameter instead. If both the templateName parameter and this parameter are omitted, then the behavior will be as though the templateName parameter were omitted and ${project.build.directory} were supplied for this parameter.
User property is: freemarker.outputFile.
skip boolean - Whether to skip execution.
Default value is: false.
User property is: freemarker.skip.
templateName String - The name of the Freemarker template to process. If set, this parameter should be set to a name that may be processed by a TemplateLoader. That means among other things that it should not be assumed that the name is a relative or absolute file path. If not set, the implication is that whatever TemplateLoader is in effect can load a template or templates without being told explicitly which template to load.
User property is: freemarker.templateName.

Parameter Details

configuration:

The Configuration representing the Freemarker template engine.
  • Type: freemarker.template.Configuration
  • Required: No

dataModel:

A Map of Strings to arbitrary Objects that will be made available in the Freemarker template's context.

The data model will contain the following "top-level" template-accessible variables by default, unless the user-supplied data model has values indexed under these keys:

enums
An object providing access to enums, indexed by classname.
statics
An object providing access to static methods and fields, indexed by classname.
classIndex
A Jandex IndexView providing access to all known classes and annotations; see the jandexIndexFile parameter documentation for details.
project
The MavenProject instance in effect during this goal's execution.
classes
A load-on-demand map of Class instances loadable from the context classloader.
contextClassLoader
The context classloader in effect during this goal's execution.
  • Type: java.util.Map
  • Required: No

jandexIndexFile:

A File representing where the (optional) Jandex index exists, providing efficient access to classes and annotations produced by the project of which this plugin execution is a part.
  • Type: java.io.File
  • Required: No
  • User Property: freemarker.jandexIndexFile
  • Default: ${project.build.outputDirectory}/META-INF/jandex.idx

modelFactories:

A Map of ModelFactory instances indexed by the names of classes for which they are suitable.
  • Type: java.util.Map
  • Required: No

outputEncoding:

The character encoding to use when reading Freemarker templates.
  • Type: java.lang.String
  • Required: No
  • Default: ${project.build.outputEncoding}

outputFile:

The full path to the file that results from processing the template given by the templateName parameter, or, if the templateName parameter is omitted, the full path to the directory that will contain general template processing output. If the templateName parameter is supplied, but this parameter is omitted, a path consisting of ${project.build.directory}/ concatenated with the value of the templateName parameter minus its .ftl suffix, if any, will be used for this parameter instead. If both the templateName parameter and this parameter are omitted, then the behavior will be as though the templateName parameter were omitted and ${project.build.directory} were supplied for this parameter.
  • Type: java.io.File
  • Required: No
  • User Property: freemarker.outputFile

skip:

Whether to skip execution.
  • Type: boolean
  • Required: No
  • User Property: freemarker.skip
  • Default: false

templateName:

The name of the Freemarker template to process. If set, this parameter should be set to a name that may be processed by a TemplateLoader. That means among other things that it should not be assumed that the name is a relative or absolute file path. If not set, the implication is that whatever TemplateLoader is in effect can load a template or templates without being told explicitly which template to load.
  • Type: java.lang.String
  • Required: No
  • User Property: freemarker.templateName