apt:test-process

Full name:

org.codehaus.mojo:apt-maven-plugin:1.0-alpha-4:test-process

Description:

Executes apt on project test sources.

Attributes:

  • Requires a Maven 2.0 project to be executed.
  • Requires dependency resolution of artifacts in scope: test.
  • Binds by default to the lifecycle phase: generate-test-resources.

Optional Parameters

Name Type Since Description
additionalSourceRoots List - The source directories containing any additional sources to be processed.
encoding String - The source file encoding name, such as EUC-JP and UTF-8. If encoding is not specified, the encoding ISO-8859-1 is used rather than the platform default for reproducibility reasons. This is equivalent to the -encoding argument for apt.
Default value is: ISO-8859-1.
excludes Set - A list of exclusion filters for apt.
executable String - The apt executable to use when forked.
Default value is: apt.
factory String - Name of AnnotationProcessorFactory to use; bypasses default discovery process. This is equivalent to the -factory argument for apt.
force boolean - Force apt processing without staleness checking. When false, use outputFiles or outputFileEndings to control computing staleness.
Default value is: false.
fork boolean - Whether to run apt in a separate process.
Default value is: false.
includes Set - A list of inclusion filters for apt. Default value is **/*.java.
maxmem String - The maximum size of the memory allocation pool when forked, for example 128m.
meminitial String - The initial size of the memory allocation pool when forked, for example 64m.
options String[] - Options to pass to annotation processors. These are equivalent to multiple -A arguments for apt.
outputFileEndings Set - The filename endings of processor-generated files to examine when computing staleness. For example, .txt would specify that the processor creates a corresponding .txt file for every .java source file. Default value is .java. Note that this parameter has no effect if outputFiles is specified.
outputFiles Set - The filenames of processor-generated files to examine when computing staleness. For example, generated.xml would specify that the processor creates the aforementioned single file from all .java source files. When this parameter is not specified, outputFileEndings is used instead.
resourceFiltering boolean - Whether resource filtering is enabled for processor-generated resources.
Default value is: false.
resourceTargetPath String - The path for processor-generated resources.
showWarnings boolean - Whether to show apt warnings. This is opposite to the -nowarn argument for apt.
Default value is: false.
skip boolean - Whether to bypass running apt.
Default value is: false.
staleMillis int - Sets the granularity in milliseconds of the last modification date for testing whether a source needs processing.
Default value is: 0.
testOutputDirectory File - The directory to place processor and generated class files. This is equivalent to the -d argument for apt.
Default value is: ${project.build.directory}/generated-test-resources/apt.
testSourceOutputDirectory File - The directory root under which processor-generated test source files will be placed; files are placed in subdirectories based on package namespace. This is equivalent to the -s argument for apt.
Default value is: ${project.build.directory}/generated-test-sources/apt.
verbose boolean - Whether to output information about each class loaded and each source file processed. This is equivalent to the -verbose argument for apt.
Default value is: false.

Parameter Details

additionalSourceRoots:

The source directories containing any additional sources to be processed.
  • Type: java.util.List
  • Required: No

encoding:

The source file encoding name, such as EUC-JP and UTF-8. If encoding is not specified, the encoding ISO-8859-1 is used rather than the platform default for reproducibility reasons. This is equivalent to the -encoding argument for apt.
  • Type: java.lang.String
  • Required: No
  • Expression: ${maven.apt.encoding}
  • Default: ISO-8859-1

excludes:

A list of exclusion filters for apt.
  • Type: java.util.Set
  • Required: No

executable:

The apt executable to use when forked.
  • Type: java.lang.String
  • Required: No
  • Expression: ${maven.apt.executable}
  • Default: apt

factory:

Name of AnnotationProcessorFactory to use; bypasses default discovery process. This is equivalent to the -factory argument for apt.
  • Type: java.lang.String
  • Required: No
  • Expression: ${maven.apt.factory}

force:

Force apt processing without staleness checking. When false, use outputFiles or outputFileEndings to control computing staleness.
  • Type: boolean
  • Required: No
  • Default: false

fork:

Whether to run apt in a separate process.
  • Type: boolean
  • Required: No
  • Default: false

includes:

A list of inclusion filters for apt. Default value is **/*.java.
  • Type: java.util.Set
  • Required: No

maxmem:

The maximum size of the memory allocation pool when forked, for example 128m.
  • Type: java.lang.String
  • Required: No

meminitial:

The initial size of the memory allocation pool when forked, for example 64m.
  • Type: java.lang.String
  • Required: No

options:

Options to pass to annotation processors. These are equivalent to multiple -A arguments for apt.
  • Type: java.lang.String[]
  • Required: No

outputFileEndings:

The filename endings of processor-generated files to examine when computing staleness. For example, .txt would specify that the processor creates a corresponding .txt file for every .java source file. Default value is .java. Note that this parameter has no effect if outputFiles is specified.
  • Type: java.util.Set
  • Required: No

outputFiles:

The filenames of processor-generated files to examine when computing staleness. For example, generated.xml would specify that the processor creates the aforementioned single file from all .java source files. When this parameter is not specified, outputFileEndings is used instead.
  • Type: java.util.Set
  • Required: No

resourceFiltering:

Whether resource filtering is enabled for processor-generated resources.
  • Type: boolean
  • Required: No
  • Default: false

resourceTargetPath:

The path for processor-generated resources.
  • Type: java.lang.String
  • Required: No

showWarnings:

Whether to show apt warnings. This is opposite to the -nowarn argument for apt.
  • Type: boolean
  • Required: No
  • Expression: ${maven.apt.showWarnings}
  • Default: false

skip:

Whether to bypass running apt.
  • Type: boolean
  • Required: No
  • Expression: ${maven.apt.skip}
  • Default: false

staleMillis:

Sets the granularity in milliseconds of the last modification date for testing whether a source needs processing.
  • Type: int
  • Required: No
  • Expression: ${maven.apt.staleMillis}
  • Default: 0

testOutputDirectory:

The directory to place processor and generated class files. This is equivalent to the -d argument for apt.
  • Type: java.io.File
  • Required: No
  • Default: ${project.build.directory}/generated-test-resources/apt

testSourceOutputDirectory:

The directory root under which processor-generated test source files will be placed; files are placed in subdirectories based on package namespace. This is equivalent to the -s argument for apt.
  • Type: java.io.File
  • Required: No
  • Default: ${project.build.directory}/generated-test-sources/apt

verbose:

Whether to output information about each class loaded and each source file processed. This is equivalent to the -verbose argument for apt.
  • Type: boolean
  • Required: No
  • Expression: ${maven.apt.verbose}
  • Default: false