tentackle-check:validations

Full name:

org.tentackle:tentackle-check-maven-plugin:25.20.0.0:validations

Description:

Verifies all annotation-based validations.
Scans for validator annotations (annotated with @Validation), creates the validators and their compound values for the annotation's value, message and condition. Value and condition scripts are compiled once. Message scripts are evaluated for each configured locale, which resolves the translations of i18n-scripts (see @MessageScriptConverter) as well.

The plugin ships no scripting language. The provider of the language, such as tentackle-script-groovy, must be added as a plugin dependency.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: compile.
  • The goal is thread-safe and supports parallel builds.
  • Binds by default to the lifecycle phase: process-classes.

Required Parameters

Name Type Since Description
<sourceDir> File - Directory holding the sources to be processed.
Defaults to all Java sources of the current project. Use filesets to check only a subset or to exclude files.
Default: ${project.build.sourceDirectory}
User Property: tentackle.sourceDir

Optional Parameters

Name Type Since Description
<charset> String - The encoding to read and write files.
Applied JVM-wide, see org.tentackle.maven.AbstractTentackleMojo.determineEncoding() .
Default: ${project.build.sourceEncoding}
<compilerArgs> List<String> - Arguments to be passed to the compiler.
(see maven-compiler-plugin)

Unless one of them is a -proc: option, -proc:only is added.

<compilerArgument> String - A single argument to be passed to the compiler as is.
(see maven-compiler-plugin)
<encoding> String - The source file encoding.
If not set, the compiler's default is used.
Default: ${project.build.sourceEncoding}
<filesets> List<FileSet> - The list of file sets.
If set, they are processed instead of the whole source directory. A file set without a directory defaults to the source directory.
<jdkToolchain> Map<String,String> - Toolchain for invocation of external tools.
Explicitly specifies the "jdk" toolchain for this plugin only. Overrides the toolchain selected by the maven-toolchain-plugin, if any.

Example:

  <jdkToolchain>
    <version>25</version>
  </jdkToolchain>
To deselect the toolchain configured by the maven-toolchain-plugin:
  <jdkToolchain></jdkToolchain>
<locales> String - The locales to check the bundles and validation messages against.
A comma, semicolon or whitespace separated list. Both the en_US and the en-US notation are accepted. Defaults to the build's default locale.

The fallback locale should come first, because the bundles of the other locales are compared against it.

<minLogLevel> String - The minimum logging java.util.logging.Level to redirect java.util logging to the maven logger.
Any name or value accepted by java.util.logging.Level.parse(java.lang.String) .
Default: WARNING
<scriptingLanguage> String - The default scripting language of the validator scripts.
Required if scripts use the shorthand {...} instead of naming their language explicitly, such as #!groovy{...}. The language's provider must be added as a plugin dependency.
<showCompileOutput> boolean - Shows the compiler diagnostics in the build log.
Errors reported by the annotation processors are always shown.
Default: ${tentackle.showCompileOutput}
<skip> Boolean - Skips processing.
If not set, defaults to true if packaging is "pom" and the execution is recursive (see org.tentackle.maven.AbstractTentackleMojo.isSkippedByDefault() ).
<skipTests> boolean - Skips the checks.
Bound to skipTests, so -DskipTests skips them together with the unit tests.
Default: ${skipTests}
<verbosity> String - The verbosity.
One of "default", "info" or "debug". Other values are treated as "default".
If not set, debug is turned on by Maven's global debug flag (see command line switch -X).
Default: ${tentackle.verbosity}

Parameter Details

<charset>

The encoding to read and write files.
Applied JVM-wide, see org.tentackle.maven.AbstractTentackleMojo.determineEncoding() .
  • Type: java.lang.String
  • Required: No
  • Default: ${project.build.sourceEncoding}

<compilerArgs>

Arguments to be passed to the compiler.
(see maven-compiler-plugin)

Unless one of them is a -proc: option, -proc:only is added.

  • Type: java.util.List<java.lang.String>
  • Required: No

<compilerArgument>

A single argument to be passed to the compiler as is.
(see maven-compiler-plugin)
  • Type: java.lang.String
  • Required: No

<encoding>

The source file encoding.
If not set, the compiler's default is used.
  • Type: java.lang.String
  • Required: No
  • Default: ${project.build.sourceEncoding}

<filesets>

The list of file sets.
If set, they are processed instead of the whole source directory. A file set without a directory defaults to the source directory.
  • Type: java.util.List<org.apache.maven.shared.model.fileset.FileSet>
  • Required: No

<jdkToolchain>

Toolchain for invocation of external tools.
Explicitly specifies the "jdk" toolchain for this plugin only. Overrides the toolchain selected by the maven-toolchain-plugin, if any.

Example:

  <jdkToolchain>
    <version>25</version>
  </jdkToolchain>
To deselect the toolchain configured by the maven-toolchain-plugin:
  <jdkToolchain></jdkToolchain>
  • Type: java.util.Map<java.lang.String, java.lang.String>
  • Required: No

<locales>

The locales to check the bundles and validation messages against.
A comma, semicolon or whitespace separated list. Both the en_US and the en-US notation are accepted. Defaults to the build's default locale.

The fallback locale should come first, because the bundles of the other locales are compared against it.

  • Type: java.lang.String
  • Required: No

<minLogLevel>

The minimum logging java.util.logging.Level to redirect java.util logging to the maven logger.
Any name or value accepted by java.util.logging.Level.parse(java.lang.String) .
  • Type: java.lang.String
  • Required: No
  • Default: WARNING

<scriptingLanguage>

The default scripting language of the validator scripts.
Required if scripts use the shorthand {...} instead of naming their language explicitly, such as #!groovy{...}. The language's provider must be added as a plugin dependency.
  • Type: java.lang.String
  • Required: No

<showCompileOutput>

Shows the compiler diagnostics in the build log.
Errors reported by the annotation processors are always shown.
  • Type: boolean
  • Required: No
  • Default: ${tentackle.showCompileOutput}

<skip>

Skips processing.
If not set, defaults to true if packaging is "pom" and the execution is recursive (see org.tentackle.maven.AbstractTentackleMojo.isSkippedByDefault() ).
  • Type: java.lang.Boolean
  • Required: No

<skipTests>

Skips the checks.
Bound to skipTests, so -DskipTests skips them together with the unit tests.
  • Type: boolean
  • Required: No
  • Default: ${skipTests}

<sourceDir>

Directory holding the sources to be processed.
Defaults to all Java sources of the current project. Use filesets to check only a subset or to exclude files.
  • Type: java.io.File
  • Required: Yes
  • User Property: tentackle.sourceDir
  • Default: ${project.build.sourceDirectory}

<verbosity>

The verbosity.
One of "default", "info" or "debug". Other values are treated as "default".
If not set, debug is turned on by Maven's global debug flag (see command line switch -X).
  • Type: java.lang.String
  • Required: No
  • Default: ${tentackle.verbosity}