Parent Project
Project Documentation
Foundation

apt:execute

Mojo Attributes :

  • Requires a Maven 2.0 project to execute.
  • Requires dependency resolution of artifacts in scope: compile
  • 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 sources to be processed.
encoding String The -encoding argument for the Apt
excludes Set A list of exclusion filters for the compiler.
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.
generated String The source directory containing the generated sources. Default value is src/main/gen.
includes Set A list of inclusion filters for the compiler.
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
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
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 sources to be processed.

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

encoding

The -encoding argument for the Apt

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

excludes

A list of exclusion filters for the compiler.

  • Type : java.util.Set
  • 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

generated

The source directory containing the generated sources.

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

includes

A list of inclusion filters for the compiler.

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

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

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

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}