modelant.template..:apply-templates

Full name:

net.mdatools:modelant.template.maven.plugin:3.3.0:apply-templates

Description:

Apply the named template on the value of the named system property, in order to produce the contents of the target file.

Attributes:

  • Requires a Maven project to be executed.
  • Binds by default to the lifecycle phase: compile.
  • Invokes the execution of the lifecycle phase compile prior to executing itself.

Required Parameters

Name Type Since Description
<javaSourceDirectory> File - The directory where to hold the translated to JAVA templates
Default value is: ${project.build.directory}/java.
<targetFile> File - The file to produce
<targetObject> Object - The value (usually a maven property value) to render
<template> String - The name of the template to apply
<templateDirectory> File - Where the source files of the project templates are
Default value is: ${project.build.sourceDirectory}/../template.
<uniqueName> String - Non-empty unique name to differentiate the set of templates to compile in this maven project from any other set to compile in other projects. It also should avoid producing standard package names that are forbidden for custom class loaders. It should not be among the forbidden package names like: java, com.sun

Optional Parameters

Name Type Since Description
<shouldCompileForDebug> boolean - If the compiler should include debug information, set it to true
Alias is: compileForDebug.
<shouldKeepGenerated> boolean - If the generated Java files from the templates should not be deleted (for tracing purposes) set it to true
Alias is: keepGenerated.
<templateEncoding> String - Encoding of the template files, default: ISO-8859-1
Default value is: ISO-8859-1.

Parameter Details

<javaSourceDirectory>

The directory where to hold the translated to JAVA templates
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.build.directory}/java

<shouldCompileForDebug>

If the compiler should include debug information, set it to true
  • Type: boolean
  • Required: No
  • Alias: compileForDebug

<shouldKeepGenerated>

If the generated Java files from the templates should not be deleted (for tracing purposes) set it to true
  • Type: boolean
  • Required: No
  • Alias: keepGenerated

<targetFile>

The file to produce
  • Type: java.io.File
  • Required: Yes

<targetObject>

The value (usually a maven property value) to render
  • Type: java.lang.Object
  • Required: Yes

<template>

The name of the template to apply
  • Type: java.lang.String
  • Required: Yes

<templateDirectory>

Where the source files of the project templates are
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.build.sourceDirectory}/../template

<templateEncoding>

Encoding of the template files, default: ISO-8859-1
  • Type: java.lang.String
  • Required: No
  • Default: ISO-8859-1

<uniqueName>

Non-empty unique name to differentiate the set of templates to compile in this maven project from any other set to compile in other projects. It also should avoid producing standard package names that are forbidden for custom class loaders. It should not be among the forbidden package names like: java, com.sun
  • Type: java.lang.String
  • Required: Yes