Parent Project
Project Documentation
Foundation

apt:testExecute

Mojo Attributes :

  • Requires a Maven 2.0 project to execute.
  • Requires dependency resolution of artifacts in scope: test
  • Automatically executes within the lifecycle phase: generate-sources

Optional Parameters

Name Type Description
aptOptions String Comma separated list of "-A" options: Next two examples are equivalent:
<A>-Adebug,-Aloglevel=3</A>
<A>debug, loglevel=3</A>
aptSourceRoots List The extra source directories containing the test-source to be processed.
encoding String The -encoding argument for the Apt
factory String Name of AnnotationProcessorFactory to use; bypasses default discovery process
force boolean Force apt call without staleness checking. Default value is false.
fork boolean Allows running the compiler in a separate process. If "false" it uses the built in compiler, while if "true" it will use an executable. Default value is false.
maxmemory String Initial size, in megabytes, of the memory allocation pool, ex. "64", "64m" if fork is set to true.
minmemory String Sets the maximum size, in megabytes, of the memory allocation pool, ex. "128", "128m" if fork is set to true.
nocompile boolean The -nocompile argument for the Apt Default value is false.
resourceFiltering boolean enables resource filtering for generated resources Default value is false.
resourceTargetPath String targetPath for generated resources
showDeprecation boolean Output source locations where deprecated APIs are used
showWarnings boolean Output warnings
skip boolean Set this to 'true' to bypass unit tests entirely. Its use is NOT RECOMMENDED, but quite convenient on occasion.
staleMillis int The granularity in milliseconds of the last modification date for testing whether a source needs recompilation Default value is 0.
targetFiles List A List of targetFiles for SingleSourceTargetMapping
testExcludes Set A list of exclusion filters for the compiler.
testGenerated String The source directory containing the generated sources to be compiled. Default value is src/test/gen.
testIncludes Set A list of inclusion filters for the compiler.
verbose boolean run Apt in verbode mode Default value is false.
workingDir File Working directory when APT compiler is forked Default value is ${basedir}.

Parameter Details

aptOptions

Comma separated list of "-A" options: Next two examples are equivalent:

<A>-Adebug,-Aloglevel=3</A>
<A>debug, loglevel=3</A>

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

aptSourceRoots

The extra source directories containing the test-source to be processed.

  • Type : java.util.List
  • Required : No

encoding

The -encoding argument for the Apt

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

factory

Name of AnnotationProcessorFactory to use; bypasses default discovery process

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

force

Force apt call without staleness checking.

  • Type : boolean
  • Required : No
  • Default : false

fork

Allows running the compiler in a separate process. If "false" it uses the built in compiler, while if "true" it will use an executable.

  • Type : boolean
  • Required : No
  • Default : false

maxmemory

Initial size, in megabytes, of the memory allocation pool, ex. "64", "64m" if fork is set to true.

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

minmemory

Sets the maximum size, in megabytes, of the memory allocation pool, ex. "128", "128m" if fork is set to true.

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

nocompile

The -nocompile argument for the Apt

  • Type : boolean
  • Required : No
  • Default : false

resourceFiltering

enables resource filtering for generated resources

  • Type : boolean
  • Required : No
  • Default : false

resourceTargetPath

targetPath for generated resources

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

showDeprecation

Output source locations where deprecated APIs are used

  • Type : boolean
  • Required : No

showWarnings

Output warnings

  • Type : boolean
  • Required : No

skip

Set this to 'true' to bypass unit tests entirely. Its use is NOT RECOMMENDED, but quite convenient on occasion.

  • Type : boolean
  • Required : No
  • Expression : ${maven.test.skip}

staleMillis

The granularity in milliseconds of the last modification date for testing whether a source needs recompilation

  • Type : int
  • Required : No
  • Expression : ${lastModGranularityMs}
  • Default : 0

targetFiles

A List of targetFiles for SingleSourceTargetMapping

  • Type : java.util.List
  • Required : No

testExcludes

A list of exclusion filters for the compiler.

  • Type : java.util.Set
  • Required : No

testGenerated

The source directory containing the generated sources to be compiled.

  • Type : java.lang.String
  • Required : No
  • Default : src/test/gen

testIncludes

A list of inclusion filters for the compiler.

  • Type : java.util.Set
  • Required : No

verbose

run Apt in verbode mode

  • Type : boolean
  • Required : No
  • Expression : ${verbose}
  • Default : false

workingDir

Working directory when APT compiler is forked

  • Type : java.io.File
  • Required : No
  • Default : ${basedir}