compiler:testCompile
Full name:
org.apache.maven.plugins:maven-compiler-plugin:3.13.0:testCompile
Description:
Compiles application test sources. By default uses the javac compiler of the JDK used to execute Maven. This can be overwritten through Toolchains or parameter compilerId
.
See also: javac Command
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:
2.0
. - Binds by default to the lifecycle phase:
test-compile
.
Required Parameters
Name | Type | Since | Description |
---|---|---|---|
<compileSourceRoots> |
List<String> |
- |
The source directories containing the test-source to be compiled. Default: ${project.testCompileSourceRoots} |
<outputDirectory> |
File |
- |
The directory where compiled test classes go.
This parameter should only be modified in special cases. See the See also: CompilerMojo.outputDirectory Default: ${project.build.testOutputDirectory} |
Optional Parameters
Name | Type | Since | Description |
---|---|---|---|
<annotationProcessorPaths> |
List<DependencyCoordinate> |
3.5 |
Classpath elements to supply as annotation processor path. If specified, the compiler will detect annotation processors only in those classpath elements. If omitted, the default classpath is used to detect annotation processors. The detection itself depends on the configuration of Each classpath element is specified using their Maven coordinates (groupId, artifactId, version, classifier, type). Transitive dependencies are added automatically. Exclusions are supported as well. Example: <configuration> <annotationProcessorPaths> <path> <groupId>org.sample</groupId> <artifactId>sample-annotation-processor</artifactId> <version>1.2.3</version> <!-- Optional - taken from dependency management if not specified --> <!-- Optionally exclude transitive dependencies --> <exclusions> <exclusion> <groupId>org.sample</groupId> <artifactId>sample-dependency</artifactId> </exclusion> </exclusions> </path> <!-- ... more ... --> </annotationProcessorPaths> </configuration>Note: Exclusions are supported from version 3.11.0. See also: javac -processorpath, javac Annotation Processing |
<annotationProcessorPathsUseDepMgmt> |
boolean |
3.12.0 |
Whether to use the Maven dependency management section when resolving transitive dependencies of annotation processor paths. This flag does not enable / disable the ability to resolve the version of annotation processor paths from dependency management section. It only influences the resolution of transitive dependencies of those top-level paths. Default: false |
<annotationProcessors> |
String[] |
2.2 |
Names of annotation processors to run. Only applies to JDK 1.6+ If not set, the default annotation processors discovery process applies. See also: javac -processor, javac Annotation Processing |
<compilerArgs> |
List<String> |
3.1 |
Sets the arguments to be passed to the compiler. Note that <compilerArgs> <arg>-Xmaxerrs</arg> <arg>1000</arg> <arg>-Xlint</arg> <arg>-J-Duser.language=en_us</arg> </compilerArgs> See also: javac -J |
<compilerArgument> |
String |
- |
Sets the unformatted single argument string to be passed to the compiler. To pass multiple arguments such as This is because the list of valid arguments passed to a Java compiler varies based on the compiler version. Note that See also: javac -J |
<compilerArguments> |
Map<String,String> |
2.0.1 |
Deprecated. Sets the arguments to be passed to the compiler (prepending a dash). This is because the list of valid arguments passed to a Java compiler varies based on the compiler version. Note that To pass <compilerArguments> <Xmaxerrs>1000</Xmaxerrs> <Xlint/> <Xlint:-path/> <Averbose>true</Averbose> </compilerArguments> |
<compilerId> |
String |
- |
The compiler id of the compiler to use. See this guide for more information. Default: javac User Property: maven.compiler.compilerId |
<compilerReuseStrategy> |
String |
2.5 |
Strategy to re use javacc class created:
Default: ${reuseCreated} User Property: maven.compiler.compilerReuseStrategy |
<compilerVersion> |
String |
- |
Deprecated. Version of the compiler to use, ex. "1.3", "1.5", if fork is set to true .User Property: maven.compiler.compilerVersion |
<createMissingPackageInfoClass> |
boolean |
3.10 |
Package info source files that only contain javadoc and no annotation on the package can lead to no class file being generated by the compiler. This causes a file miss on the next compilations and forces an unnecessary recompilation. The default value of true causes an empty class file to be generated. This behavior can be changed by setting this parameter to false .Default: true User Property: maven.compiler.createMissingPackageInfoClass |
<debug> |
boolean |
- |
Set to true to include debugging information in the compiled class files.See also: javac -g, debuglevel Default: true User Property: maven.compiler.debug |
<debugFileName> |
String |
3.10.0 |
when forking and debug activated the commandline used will be dumped in this file Default: javac-test |
<debuglevel> |
String |
2.1 |
Keyword list to be appended to the -g command-line switch. Legal values are none or a comma-separated list of the following keywords: lines , vars , and source . If debug level is not specified, by default, nothing will be appended to -g . If debug is not turned on, this attribute will be ignored.See also: javac -G:[lines,vars,source] User Property: maven.compiler.debuglevel |
<enablePreview> |
boolean |
3.10.1 |
Set to true to enable preview language features of the java compilerSee also: javac --enable-preview Default: false User Property: maven.compiler.enablePreview |
<encoding> |
String |
2.1 |
The -encoding argument for the Java compiler.See also: javac -encoding Default: ${project.build.sourceEncoding} User Property: encoding |
<executable> |
String |
- |
Sets the executable of the compiler to use when fork is true .User Property: maven.compiler.executable |
<failOnError> |
boolean |
2.0.2 |
Indicates whether the build will continue even if there are compilation errors. Default: true User Property: maven.compiler.failOnError |
<failOnWarning> |
boolean |
3.6 |
Indicates whether the build will continue even if there are compilation warnings. Default: false User Property: maven.compiler.failOnWarning |
<fileExtensions> |
Set<String> |
3.1 |
File extensions to check timestamp for incremental build. Default: class,jar |
<forceJavacCompilerUse> |
boolean |
3.0 |
Deprecated. Legacy parameter name of forceLegacyJavacApi . Only considered if forceLegacyJavacApi is not set or false .Default: false User Property: maven.compiler.forceJavacCompilerUse |
<forceLegacyJavacApi> |
boolean |
3.13 |
The underlying compiler now uses javax.tools API if available in your current JDK. Set this to true to always use the legacy com.sun.tools.javac API instead.
This only has an effect for Default: false User Property: maven.compiler.forceLegacyJavacApi |
<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: false User Property: maven.compiler.fork |
<generatedTestSourcesDirectory> |
File |
2.2 |
Specify where to place generated source files created by annotation processing. Only applies to JDK 1.6+ Default: ${project.build.directory}/generated-test-sources/test-annotations |
<implicit> |
String |
3.10.2 |
Keyword to be appended to the -implicit: command-line switch.See also: javac -implicit User Property: maven.compiler.implicit |
<jdkToolchain> |
Map<String,String> |
3.6 |
Specify the requirements for this jdk toolchain for using a different <configuration> <jdkToolchain> <version>11</version> </jdkToolchain> ... </configuration> <configuration> <jdkToolchain> <version>1.8</version> <vendor>zulu</vendor> </jdkToolchain> ... </configuration>note: requires at least Maven 3.3.1 |
<maxmem> |
String |
2.0.1 |
Sets the maximum size, in megabytes, of the memory allocation pool, ex. "128", "128m" if fork is set to true .User Property: maven.compiler.maxmem |
<meminitial> |
String |
2.0.1 |
Initial size, in megabytes, of the memory allocation pool, ex. "64", "64m" if fork is set to true .User Property: maven.compiler.meminitial |
<optimize> |
boolean |
- |
Deprecated. Set to true to optimize the compiled code using the compiler's optimization methods.Default: false User Property: maven.compiler.optimize |
<outputFileName> |
String |
- |
Sets the name of the output file when compiling a set of sources to a single file. expression="${project.build.finalName}" |
<outputTimestamp> |
String |
3.12.0 |
Timestamp for reproducible output archive entries, either formatted as ISO 8601 yyyy-MM-dd'T'HH:mm:ssXXX or as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).Default: ${project.build.outputTimestamp} |
<parameters> |
boolean |
3.6.2 |
Set to true to generate metadata for reflection on method parameters.See also: javac -parameters Default: false User Property: maven.compiler.parameters |
<proc> |
String |
2.2 |
Sets whether annotation processing is performed or not. Only applies to JDK 1.6+ If not set, both compilation and annotation processing are performed at the same time. Allowed values are:
full is the default. Starting with JDK 21, this option must be set explicitly.See also: javac -proc, javac Annotation Processing User Property: maven.compiler.proc |
<release> |
String |
3.6 |
The -release argument for the Java compiler, supported since Java9See also: javac -release User Property: maven.compiler.release |
<showCompilationChanges> |
boolean |
- |
No description. Default: false User Property: maven.compiler.showCompilationChanges |
<showDeprecation> |
boolean |
- |
Sets whether to show source locations where deprecated APIs are used. Default: false User Property: maven.compiler.showDeprecation |
<showWarnings> |
boolean |
- |
Set to false to disable warnings during compilation.Default: true User Property: maven.compiler.showWarnings |
<skip> |
boolean |
- |
Set this to 'true' to bypass compilation of test sources. Its use is NOT RECOMMENDED, but quite convenient on occasion. User Property: maven.test.skip |
<skipMultiThreadWarning> |
boolean |
2.5 |
No description. Default: false User Property: maven.compiler.skipMultiThreadWarning |
<source> |
String |
- |
The NOTE: Since 3.8.0 the default value has changed from 1.5 to 1.6 Since 3.9.0 the default value has changed from 1.6 to 1.7 Since 3.11.0 the default value has changed from 1.7 to 1.8 See also: javac -source Default: 1.8 User Property: maven.compiler.source |
<staleMillis> |
int |
- |
Sets the granularity in milliseconds of the last modification date for testing whether a source needs recompilation. Default: 0 User Property: lastModGranularityMs |
<target> |
String |
- |
The NOTE: Since 3.8.0 the default value has changed from 1.5 to 1.6 Since 3.9.0 the default value has changed from 1.6 to 1.7 Since 3.11.0 the default value has changed from 1.7 to 1.8 See also: javac -target Default: 1.8 User Property: maven.compiler.target |
<testCompilerArgument> |
String |
2.1 |
Sets the unformatted argument string to be passed to test compiler if fork is set to true. This is because the list of valid arguments passed to a Java compiler varies based on the compiler version. |
<testCompilerArguments> |
Map<String,String> |
2.1 |
Sets the arguments to be passed to test compiler (prepending a dash) if fork is set to true. This is because the list of valid arguments passed to a Java compiler varies based on the compiler version. |
<testExcludes> |
Set<String> |
- |
A list of exclusion filters for the compiler. |
<testIncludes> |
Set<String> |
- |
A list of inclusion filters for the compiler. |
<testIncrementalExcludes> |
Set<String> |
3.11 |
A list of exclusion filters for the incremental calculation. |
<testRelease> |
String |
3.6 |
the -release argument for the test Java compiler User Property: maven.compiler.testRelease |
<testSource> |
String |
2.1 |
The -source argument for the test Java compiler. User Property: maven.compiler.testSource |
<testTarget> |
String |
2.1 |
The -target argument for the test Java compiler. User Property: maven.compiler.testTarget |
<useIncrementalCompilation> |
boolean |
3.1 |
to enable/disable incremental compilation feature. This leads to two different modes depending on the underlying compiler. The default javac compiler does the following:
Default: true User Property: maven.compiler.useIncrementalCompilation |
<useModulePath> |
boolean |
3.11 |
When Default: true |
<verbose> |
boolean |
- |
Set to true to show messages about what the compiler is doing.See also: javac -verbose Default: false User Property: maven.compiler.verbose |
Parameter Details
<annotationProcessorPaths>
Classpath elements to supply as annotation processor path. If specified, the compiler will detect annotation processors only in those classpath elements. If omitted, the default classpath is used to detect annotation processors. The detection itself depends on the configuration of annotationProcessors
.
Each classpath element is specified using their Maven coordinates (groupId, artifactId, version, classifier, type). Transitive dependencies are added automatically. Exclusions are supported as well. Example:
<configuration> <annotationProcessorPaths> <path> <groupId>org.sample</groupId> <artifactId>sample-annotation-processor</artifactId> <version>1.2.3</version> <!-- Optional - taken from dependency management if not specified --> <!-- Optionally exclude transitive dependencies --> <exclusions> <exclusion> <groupId>org.sample</groupId> <artifactId>sample-dependency</artifactId> </exclusion> </exclusions> </path> <!-- ... more ... --> </annotationProcessorPaths> </configuration>Note: Exclusions are supported from version 3.11.0.
See also: javac -processorpath, javac Annotation Processing
- Type:
java.util.List<org.apache.maven.plugin.compiler.DependencyCoordinate>
- Since:
3.5
- Required:
report.plugin.goal.no
<annotationProcessorPathsUseDepMgmt>
Whether to use the Maven dependency management section when resolving transitive dependencies of annotation processor paths.
This flag does not enable / disable the ability to resolve the version of annotation processor paths from dependency management section. It only influences the resolution of transitive dependencies of those top-level paths.
- Type:
boolean
- Since:
3.12.0
- Required:
report.plugin.goal.no
- Default:
false
<annotationProcessors>
Names of annotation processors to run. Only applies to JDK 1.6+ If not set, the default annotation processors discovery process applies.
See also: javac -processor, javac Annotation Processing
- Type:
java.lang.String[]
- Since:
2.2
- Required:
report.plugin.goal.no
<compilerArgs>
Sets the arguments to be passed to the compiler.
Note that -J
options are only passed through if fork
is set to true
.
<compilerArgs> <arg>-Xmaxerrs</arg> <arg>1000</arg> <arg>-Xlint</arg> <arg>-J-Duser.language=en_us</arg> </compilerArgs>
See also: javac -J
- Type:
java.util.List<java.lang.String>
- Since:
3.1
- Required:
report.plugin.goal.no
<compilerArgument>
Sets the unformatted single argument string to be passed to the compiler. To pass multiple arguments such as -Xmaxerrs 1000
(which are actually two arguments) you have to use compilerArgs
.
This is because the list of valid arguments passed to a Java compiler varies based on the compiler version.
Note that -J
options are only passed through if fork
is set to true
.
See also: javac -J
- Type:
java.lang.String
- Required:
report.plugin.goal.no
<compilerArguments>
compilerArgs
instead.Sets the arguments to be passed to the compiler (prepending a dash).
This is because the list of valid arguments passed to a Java compiler varies based on the compiler version.
Note that -J
options are only passed through if fork
is set to true
.
To pass -Xmaxerrs 1000 -Xlint -Xlint:-path -Averbose=true
you should include the following:
<compilerArguments> <Xmaxerrs>1000</Xmaxerrs> <Xlint/> <Xlint:-path/> <Averbose>true</Averbose> </compilerArguments>
- Type:
java.util.Map<java.lang.String, java.lang.String>
- Since:
2.0.1
- Required:
report.plugin.goal.no
<compilerId>
- Type:
java.lang.String
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.compilerId
- Default:
javac
<compilerReuseStrategy>
reuseCreated
(default): will reuse already created but in case of multi-threaded builds, each thread will have its own instancereuseSame
: the same Javacc class will be used for each compilation even for multi-threaded buildalwaysNew
: a new Javacc class will be created for each compilation
- Type:
java.lang.String
- Since:
2.5
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.compilerReuseStrategy
- Default:
${reuseCreated}
<compilerVersion>
javac
binary is automatically retrieved.fork
is set to true
.- Type:
java.lang.String
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.compilerVersion
<compileSourceRoots>
- Type:
java.util.List<java.lang.String>
- Required:
report.plugin.goal.yes
- Default:
${project.testCompileSourceRoots}
<createMissingPackageInfoClass>
true
causes an empty class file to be generated. This behavior can be changed by setting this parameter to false
.- Type:
boolean
- Since:
3.10
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.createMissingPackageInfoClass
- Default:
true
<debug>
true
to include debugging information in the compiled class files.See also: javac -g, debuglevel
- Type:
boolean
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.debug
- Default:
true
<debugFileName>
- Type:
java.lang.String
- Since:
3.10.0
- Required:
report.plugin.goal.no
- Default:
javac-test
<debuglevel>
-g
command-line switch. Legal values are none or a comma-separated list of the following keywords: lines
, vars
, and source
. If debug level is not specified, by default, nothing will be appended to -g
. If debug
is not turned on, this attribute will be ignored.See also: javac -G:[lines,vars,source]
- Type:
java.lang.String
- Since:
2.1
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.debuglevel
<enablePreview>
true
to enable preview language features of the java compilerSee also: javac --enable-preview
- Type:
boolean
- Since:
3.10.1
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.enablePreview
- Default:
false
<encoding>
- Type:
java.lang.String
- Since:
2.1
- Required:
report.plugin.goal.no
- User Property:
encoding
- Default:
${project.build.sourceEncoding}
<executable>
fork
is true
.- Type:
java.lang.String
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.executable
<failOnError>
- Type:
boolean
- Since:
2.0.2
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.failOnError
- Default:
true
<failOnWarning>
- Type:
boolean
- Since:
3.6
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.failOnWarning
- Default:
false
<fileExtensions>
- Type:
java.util.Set<java.lang.String>
- Since:
3.1
- Required:
report.plugin.goal.no
- Default:
class,jar
<forceJavacCompilerUse>
forceLegacyJavacApi
insteadforceLegacyJavacApi
. Only considered if forceLegacyJavacApi
is not set or false
.- Type:
boolean
- Since:
3.0
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.forceJavacCompilerUse
- Default:
false
<forceLegacyJavacApi>
javax.tools
API if available in your current JDK. Set this to true
to always use the legacy com.sun.tools.javac
API instead.
This only has an effect for compilerId
being javac
and fork
being false
.
- Type:
boolean
- Since:
3.13
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.forceLegacyJavacApi
- Default:
false
<fork>
false
it uses the built in compiler, while if true
it will use an executable.- Type:
boolean
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.fork
- Default:
false
<generatedTestSourcesDirectory>
Specify where to place generated source files created by annotation processing. Only applies to JDK 1.6+
- Type:
java.io.File
- Since:
2.2
- Required:
report.plugin.goal.no
- Default:
${project.build.directory}/generated-test-sources/test-annotations
<implicit>
- Type:
java.lang.String
- Since:
3.10.2
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.implicit
<jdkToolchain>
Specify the requirements for this jdk toolchain for using a different javac
than the one of the JRE used by Maven. This overrules the toolchain selected by the maven-toolchain-plugin.
<configuration> <jdkToolchain> <version>11</version> </jdkToolchain> ... </configuration> <configuration> <jdkToolchain> <version>1.8</version> <vendor>zulu</vendor> </jdkToolchain> ... </configuration>note: requires at least Maven 3.3.1
- Type:
java.util.Map<java.lang.String, java.lang.String>
- Since:
3.6
- Required:
report.plugin.goal.no
<maxmem>
fork
is set to true
.- Type:
java.lang.String
- Since:
2.0.1
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.maxmem
<meminitial>
fork
is set to true
.- Type:
java.lang.String
- Since:
2.0.1
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.meminitial
<optimize>
javac
.true
to optimize the compiled code using the compiler's optimization methods.- Type:
boolean
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.optimize
- Default:
false
<outputDirectory>
This parameter should only be modified in special cases. See the CompilerMojo.outputDirectory
for more information.
See also: CompilerMojo.outputDirectory
- Type:
java.io.File
- Required:
report.plugin.goal.yes
- Default:
${project.build.testOutputDirectory}
<outputFileName>
- Type:
java.lang.String
- Required:
report.plugin.goal.no
<outputTimestamp>
yyyy-MM-dd'T'HH:mm:ssXXX
or as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).- Type:
java.lang.String
- Since:
3.12.0
- Required:
report.plugin.goal.no
- Default:
${project.build.outputTimestamp}
<parameters>
- Type:
boolean
- Since:
3.6.2
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.parameters
- Default:
false
<proc>
Sets whether annotation processing is performed or not. Only applies to JDK 1.6+ If not set, both compilation and annotation processing are performed at the same time.
Allowed values are:
none
- no annotation processing is performed.only
- only annotation processing is done, no compilation.full
- annotation processing and compilation.
full
is the default. Starting with JDK 21, this option must be set explicitly.See also: javac -proc, javac Annotation Processing
- Type:
java.lang.String
- Since:
2.2
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.proc
<release>
- Type:
java.lang.String
- Since:
3.6
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.release
<showCompilationChanges>
- Type:
boolean
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.showCompilationChanges
- Default:
false
<showDeprecation>
- Type:
boolean
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.showDeprecation
- Default:
false
<showWarnings>
false
to disable warnings during compilation.- Type:
boolean
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.showWarnings
- Default:
true
<skip>
- Type:
boolean
- Required:
report.plugin.goal.no
- User Property:
maven.test.skip
<skipMultiThreadWarning>
- Type:
boolean
- Since:
2.5
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.skipMultiThreadWarning
- Default:
false
<source>
The -source
argument for the Java compiler.
NOTE:
Since 3.8.0 the default value has changed from 1.5 to 1.6
Since 3.9.0 the default value has changed from 1.6 to 1.7
Since 3.11.0 the default value has changed from 1.7 to 1.8
See also: javac -source
- Type:
java.lang.String
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.source
- Default:
1.8
<staleMillis>
- Type:
int
- Required:
report.plugin.goal.no
- User Property:
lastModGranularityMs
- Default:
0
<target>
The -target
argument for the Java compiler.
NOTE:
Since 3.8.0 the default value has changed from 1.5 to 1.6
Since 3.9.0 the default value has changed from 1.6 to 1.7
Since 3.11.0 the default value has changed from 1.7 to 1.8
See also: javac -target
- Type:
java.lang.String
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.target
- Default:
1.8
<testCompilerArgument>
Sets the unformatted argument string to be passed to test compiler if fork is set to true.
This is because the list of valid arguments passed to a Java compiler varies based on the compiler version.
- Type:
java.lang.String
- Since:
2.1
- Required:
report.plugin.goal.no
<testCompilerArguments>
Sets the arguments to be passed to test compiler (prepending a dash) if fork is set to true.
This is because the list of valid arguments passed to a Java compiler varies based on the compiler version.
- Type:
java.util.Map<java.lang.String, java.lang.String>
- Since:
2.1
- Required:
report.plugin.goal.no
<testExcludes>
- Type:
java.util.Set<java.lang.String>
- Required:
report.plugin.goal.no
<testIncludes>
- Type:
java.util.Set<java.lang.String>
- Required:
report.plugin.goal.no
<testIncrementalExcludes>
- Type:
java.util.Set<java.lang.String>
- Since:
3.11
- Required:
report.plugin.goal.no
<testRelease>
- Type:
java.lang.String
- Since:
3.6
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.testRelease
<testSource>
- Type:
java.lang.String
- Since:
2.1
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.testSource
<testTarget>
- Type:
java.lang.String
- Since:
2.1
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.testTarget
<useIncrementalCompilation>
to enable/disable incremental compilation feature.
This leads to two different modes depending on the underlying compiler. The default javac compiler does the following:
- true (default) in this mode the compiler plugin determines whether any JAR files the current module depends on have changed in the current build run; or any source file was added, removed or changed since the last compilation. If this is the case, the compiler plugin recompiles all sources.
- false (not recommended) this only compiles source files which are newer than their corresponding class files, namely which have changed since the last compilation. This does not recompile other classes which use the changed class, potentially leaving them with references to methods that no longer exist, leading to errors at runtime.
- Type:
boolean
- Since:
3.1
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.useIncrementalCompilation
- Default:
true
<useModulePath>
When true
, uses the module path when compiling with a release or target of 9+ and module-info.java or module-info.class is present. When false
, always uses the class path.
- Type:
boolean
- Since:
3.11
- Required:
report.plugin.goal.no
- Default:
true
<verbose>
- Type:
boolean
- Required:
report.plugin.goal.no
- User Property:
maven.compiler.verbose
- Default:
false