truelicense:generate-main-sources

Full name:

net.truelicense:truelicense-maven-plugin:3.2.0:generate-main-sources

Description:

Generates main source files by merging a set of Apache Velocity template files with all properties in the Maven POM.

Attributes:

  • Requires a Maven project to be executed.
  • Since version: TrueLicense 2.4.
  • Binds by default to the lifecycle phase: generate-sources.

Optional Parameters

Name Type Since Description
encoding String TrueLicense 2.4 The character set to use for reading the template files and writing the output files.
Default value is: ${project.build.sourceEncoding}.
User property is: encoding.
outputDirectory File TrueLicense 2.4 The directory path where the generated source files will be stored.
Default value is: ${project.build.directory}/generated-sources.
User property is: truelicense.generate.main.outputDirectory.
properties Properties TrueLicense 2.4 A set of properties to put into the Velocity context so that they can get referenced in template files.
stripPrefix String TrueLicense 2.4 The prefix to strip from the directory path of each file set before appending it to the output directory path.
Default value is: src/main/.
User property is: truelicense.generate.main.stripPrefix.
stripSuffix String TrueLicense 2.4 The suffix to strip from the names of the output files.
Default value is: .vtl.
User property is: truelicense.generate.stripSuffix.
templateSets List TrueLicense 2.4 The list of FileSets with template files to process. Defaults to all files in the directory ${stripPrefix}java} with the suffix ${stripSuffix}}, e.g. all files in the directory src/main/java with the suffix .vtl.

Parameter Details

encoding:

The character set to use for reading the template files and writing the output files.
  • Type: java.lang.String
  • Since: TrueLicense 2.4
  • Required: No
  • User Property: encoding
  • Default: ${project.build.sourceEncoding}

outputDirectory:

The directory path where the generated source files will be stored.
  • Type: java.io.File
  • Since: TrueLicense 2.4
  • Required: No
  • User Property: truelicense.generate.main.outputDirectory
  • Default: ${project.build.directory}/generated-sources

properties:

A set of properties to put into the Velocity context so that they can get referenced in template files.
  • Type: java.util.Properties
  • Since: TrueLicense 2.4
  • Required: No

stripPrefix:

The prefix to strip from the directory path of each file set before appending it to the output directory path.
  • Type: java.lang.String
  • Since: TrueLicense 2.4
  • Required: No
  • User Property: truelicense.generate.main.stripPrefix
  • Default: src/main/

stripSuffix:

The suffix to strip from the names of the output files.
  • Type: java.lang.String
  • Since: TrueLicense 2.4
  • Required: No
  • User Property: truelicense.generate.stripSuffix
  • Default: .vtl

templateSets:

The list of FileSets with template files to process. Defaults to all files in the directory ${stripPrefix}java} with the suffix ${stripSuffix}}, e.g. all files in the directory src/main/java with the suffix .vtl.
  • Type: java.util.List
  • Since: TrueLicense 2.4
  • Required: No