Fork me on GitHub

gplus:generateTestStubs

Full name:

org.codehaus.gmavenplus:gmavenplus-plugin:3.0.2:generateTestStubs

Description:

Generates stubs for the test Groovy sources and adds them to Maven's test sources for the Maven compiler plugin to find. Note that this mojo requires Groovy >= 1.8.2.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: test.
  • The goal is thread-safe and supports parallel builds.
  • Since version: 1.0-beta-1.
  • Binds by default to the lifecycle phase: generate-test-sources.

Optional Parameters

Name Type Since Description
<debug> boolean - Whether Groovy compiler should be set to debug.
Default: false
<includeClasspath> IncludeClasspath 1.8.0 What classpath to include. One of
  • PROJECT_ONLY
  • PROJECT_AND_PLUGIN
  • PLUGIN_ONLY
Uses the same scope as the required dependency resolution of this mojo. Use only if you know what you're doing.
Default: PROJECT_ONLY
<skipBytecodeCheck> boolean 1.9.0 Whether to check that the version of Groovy used is able to use the requested targetBytecode.
Default: false
User Property: skipBytecodeCheck
<skipTests> boolean - Flag to allow test stub generation to be skipped.
Default: false
User Property: maven.test.skip
<sourceEncoding> String - The encoding of source files.
Default: ${project.build.sourceEncoding}
<targetBytecode> String 1.0-beta-3 The Groovy compiler bytecode compatibility. One of
  • 1.4 (or 4)
  • 1.5 (or 5)
  • 1.6 (or 6)
  • 1.7 (or 7)
  • 1.8 (or 8)
  • 9 (or 1.9)
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
Using 1.6 (or 6) or 1.7 (or 7) requires Groovy >= 2.1.3. Using 1.8 (or 8) requires Groovy >= 2.3.3. Using 9 (or 1.9) requires Groovy >= 2.5.3, or Groovy >= 2.6.0 alpha 4, or Groovy >= 3.0.0 alpha 2. Using 9 (or 1.9) with invokedynamic requires Groovy >= 2.5.3, or Groovy >= 3.0.0 alpha 2, but not any 2.6 versions. Using 10, 11, or 12 requires Groovy >= 2.5.3, or Groovy >= 3.0.0 alpha 4, but not any 2.6 versions. Using 13 requires Groovy >= 2.5.7, or Groovy >= 3.0.0-beta-1, but not any 2.6 versions. Using 14 requires Groovy >= 3.0.0 beta-2. Using 15 requires Groovy >= 3.0.3. Using 16 requires Groovy >= 3.0.6. Using 17 requires Groovy >= 3.0.8 or Groovy > 4.0.0-alpha-3. Using 18 requires Groovy > 4.0.0-beta-1. Using 19 requires Groovy > 4.0.2. Using 20 requires Groovy > 4.0.6. Using 21 requires Groovy > 4.0.11.
Default: 1.8
User Property: maven.compiler.target
<testSources> FileSet[] - The Groovy test source files (relative paths). Default: "${project.basedir}/src/test/groovy/**/*.groovy"
<testStubsOutputDirectory> File - The location for the compiled test classes.
Default: ${project.build.directory}/generated-sources/groovy-stubs/test
<tolerance> int - Groovy compiler error tolerance (the number of non-fatal errors (per unit) that should be tolerated before compilation is aborted).
Default: 0
<verbose> boolean - Whether Groovy compiler should be set to verbose.
Default: false
<warningLevel> int - Groovy compiler warning level. Should be one of:
0
None
1
Likely Errors
2
Possible Errors
3
Paranoia

Default: 1

Parameter Details

<debug>

Whether Groovy compiler should be set to debug.
  • Type: boolean
  • Required: report.plugin.goal.no
  • Default: false

<includeClasspath>

What classpath to include. One of
  • PROJECT_ONLY
  • PROJECT_AND_PLUGIN
  • PLUGIN_ONLY
Uses the same scope as the required dependency resolution of this mojo. Use only if you know what you're doing.
  • Type: org.codehaus.gmavenplus.model.IncludeClasspath
  • Since: 1.8.0
  • Required: report.plugin.goal.no
  • Default: PROJECT_ONLY

<skipBytecodeCheck>

Whether to check that the version of Groovy used is able to use the requested targetBytecode.
  • Type: boolean
  • Since: 1.9.0
  • Required: report.plugin.goal.no
  • User Property: skipBytecodeCheck
  • Default: false

<skipTests>

Flag to allow test stub generation to be skipped.
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: maven.test.skip
  • Default: false

<sourceEncoding>

The encoding of source files.
  • Type: java.lang.String
  • Required: report.plugin.goal.no
  • Default: ${project.build.sourceEncoding}

<targetBytecode>

The Groovy compiler bytecode compatibility. One of
  • 1.4 (or 4)
  • 1.5 (or 5)
  • 1.6 (or 6)
  • 1.7 (or 7)
  • 1.8 (or 8)
  • 9 (or 1.9)
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
Using 1.6 (or 6) or 1.7 (or 7) requires Groovy >= 2.1.3. Using 1.8 (or 8) requires Groovy >= 2.3.3. Using 9 (or 1.9) requires Groovy >= 2.5.3, or Groovy >= 2.6.0 alpha 4, or Groovy >= 3.0.0 alpha 2. Using 9 (or 1.9) with invokedynamic requires Groovy >= 2.5.3, or Groovy >= 3.0.0 alpha 2, but not any 2.6 versions. Using 10, 11, or 12 requires Groovy >= 2.5.3, or Groovy >= 3.0.0 alpha 4, but not any 2.6 versions. Using 13 requires Groovy >= 2.5.7, or Groovy >= 3.0.0-beta-1, but not any 2.6 versions. Using 14 requires Groovy >= 3.0.0 beta-2. Using 15 requires Groovy >= 3.0.3. Using 16 requires Groovy >= 3.0.6. Using 17 requires Groovy >= 3.0.8 or Groovy > 4.0.0-alpha-3. Using 18 requires Groovy > 4.0.0-beta-1. Using 19 requires Groovy > 4.0.2. Using 20 requires Groovy > 4.0.6. Using 21 requires Groovy > 4.0.11.
  • Type: java.lang.String
  • Since: 1.0-beta-3
  • Required: report.plugin.goal.no
  • User Property: maven.compiler.target
  • Default: 1.8

<testSources>

The Groovy test source files (relative paths). Default: "${project.basedir}/src/test/groovy/**/*.groovy"
  • Type: org.apache.maven.shared.model.fileset.FileSet[]
  • Required: report.plugin.goal.no

<testStubsOutputDirectory>

The location for the compiled test classes.
  • Type: java.io.File
  • Required: report.plugin.goal.no
  • Default: ${project.build.directory}/generated-sources/groovy-stubs/test

<tolerance>

Groovy compiler error tolerance (the number of non-fatal errors (per unit) that should be tolerated before compilation is aborted).
  • Type: int
  • Required: report.plugin.goal.no
  • Default: 0

<verbose>

Whether Groovy compiler should be set to verbose.
  • Type: boolean
  • Required: report.plugin.goal.no
  • Default: false

<warningLevel>

Groovy compiler warning level. Should be one of:
0
None
1
Likely Errors
2
Possible Errors
3
Paranoia
  • Type: int
  • Required: report.plugin.goal.no
  • Default: 1