compiler:testCompile

Full name:

org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile

Description:

Compiles application test sources.

Attributes:

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

Optional Parameters

Name Type Since Description
<annotationProcessorPaths> List 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 annotationProcessors.

Each classpath element is specified using their Maven coordinates (groupId, artifactId, version, classifier, type). Transitive dependencies are added automatically. Example:

<configuration>
  <annotationProcessorPaths>
    <path>
      <groupId>org.sample</groupId>
      <artifactId>sample-annotation-processor</artifactId>
      <version>1.2.3</version>
    </path>
    <!-- ... more ... -->
  </annotationProcessorPaths>
</configuration>

<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.


<compilerArgs> List 3.1

Sets the arguments to be passed to the compiler if fork is set to true. Example:

<compilerArgs>
  <arg>-Xmaxerrs</arg>
  <arg>1000</arg>
  <arg>-Xlint</arg>
  <arg>-J-Duser.language=en_us</arg>
</compilerArgs>

<compilerArgument> String 2.0

Sets the unformatted single argument string to be passed to the compiler if fork is set to true. To pass multiple arguments such as -Xmaxerrs 1000 (which are actually two arguments) you have to use compilerArguments.

This is because the list of valid arguments passed to a Java compiler varies based on the compiler version.


<compilerArguments> Map 2.0.1 Deprecated. use compilerArgs instead.
<compilerId> String 2.0 The compiler id of the compiler to use. See this guide for more information.
Default value is: javac.
User property is: maven.compiler.compilerId.
<compilerReuseStrategy> String 2.5 Strategy to re use javacc class created:
  • reuseCreated (default): will reuse already created but in case of multi-threaded builds, each thread will have its own instance
  • reuseSame: the same Javacc class will be used for each compilation even for multi-threaded build
  • alwaysNew: a new Javacc class will be created for each compilation
Note this parameter value depends on the os/jdk you are using, but the default value should work on most of env.
Default value is: ${reuseCreated}.
User property is: maven.compiler.compilerReuseStrategy.
<compilerVersion> String 2.0 Version of the compiler to use, ex. "1.3", "1.5", if fork is set to true.
User property is: maven.compiler.compilerVersion.
<debug> boolean 2.0 Set to true to include debugging information in the compiled class files.
Default value is: true.
User property is: maven.compiler.debug.
<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.
User property is: maven.compiler.debuglevel.
<encoding> String 2.1 The -encoding argument for the Java compiler.
Default value is: ${project.build.sourceEncoding}.
User property is: encoding.
<executable> String 2.0 Sets the executable of the compiler to use when fork is true.
User property is: maven.compiler.executable.
<failOnError> boolean 2.0.2 Indicates whether the build will continue even if there are compilation errors.
Default value is: true.
User property is: maven.compiler.failOnError.
<failOnWarning> boolean 3.6 Indicates whether the build will continue even if there are compilation warnings.
Default value is: false.
User property is: maven.compiler.failOnWarning.
<fileExtensions> List 3.1 file extensions to check timestamp for incremental build default contains only .class
<forceJavacCompilerUse> boolean 3.0 compiler can now use javax.tools if available in your current jdk, you can disable this feature using -Dmaven.compiler.forceJavacCompilerUse=true or in the plugin configuration
Default value is: false.
User property is: maven.compiler.forceJavacCompilerUse.
<fork> boolean 2.0 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.
User property is: 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 value is: ${project.build.directory}/generated-test-sources/test-annotations.
<jdkToolchain> Map 3.6

Specify the requirements for this jdk toolchain. This overrules the toolchain selected by the maven-toolchain-plugin.

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 is: 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 is: maven.compiler.meminitial.
<optimize> boolean 2.0 Deprecated. This property is a no-op in javac.
Default value is: false.
User property is: maven.compiler.optimize.
<outputFileName> String 2.0 Sets the name of the output file when compiling a set of sources to a single file. expression="${project.build.finalName}"
<parameters> boolean 3.6.2 Set to true to generate metadata for reflection on method parameters.
Default value is: false.
User property is: 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:

  • none - no annotation processing is performed.
  • only - only annotation processing is done, no compilation.

<release> String 3.6 The -release argument for the Java compiler, supported since Java9
User property is: maven.compiler.release.
<showDeprecation> boolean 2.0 Sets whether to show source locations where deprecated APIs are used.
Default value is: false.
User property is: maven.compiler.showDeprecation.
<showWarnings> boolean 2.0 Set to true to show compilation warnings.
Default value is: false.
User property is: maven.compiler.showWarnings.
<skip> boolean 2.0 Set this to 'true' to bypass compilation of test sources. Its use is NOT RECOMMENDED, but quite convenient on occasion.
User property is: maven.test.skip.
<skipMultiThreadWarning> boolean 2.5 (no description)
Default value is: false.
User property is: maven.compiler.skipMultiThreadWarning.
<source> String 2.0

The -source argument for the Java compiler.

NOTE: Since 3.8.0 the default value has changed from 1.5 to 1.6
Default value is: 1.6.
User property is: maven.compiler.source.
<staleMillis> int 2.0 Sets the granularity in milliseconds of the last modification date for testing whether a source needs recompilation.
Default value is: 0.
User property is: lastModGranularityMs.
<target> String 2.0

The -target argument for the Java compiler.

NOTE: Since 3.8.0 the default value has changed from 1.5 to 1.6
Default value is: 1.6.
User property is: 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 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 2.0 A list of exclusion filters for the compiler.
<testIncludes> Set 2.0 A list of inclusion filters for the compiler.
<testRelease> String 3.6 the -release argument for the test Java compiler
User property is: maven.compiler.testRelease.
<testSource> String 2.1 The -source argument for the test Java compiler.
User property is: maven.compiler.testSource.
<testTarget> String 2.1 The -target argument for the test Java compiler.
User property is: maven.compiler.testTarget.
<useIncrementalCompilation> boolean 3.1 to enable/disable incrementation compilation feature
Default value is: true.
User property is: maven.compiler.useIncrementalCompilation.
<verbose> boolean 2.0 Set to true to show messages about what the compiler is doing.
Default value is: false.
User property is: 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. Example:

<configuration>
  <annotationProcessorPaths>
    <path>
      <groupId>org.sample</groupId>
      <artifactId>sample-annotation-processor</artifactId>
      <version>1.2.3</version>
    </path>
    <!-- ... more ... -->
  </annotationProcessorPaths>
</configuration>
  • Type: java.util.List
  • Since: 3.5
  • Required: No

<annotationProcessors>

Names of annotation processors to run. Only applies to JDK 1.6+ If not set, the default annotation processors discovery process applies.

  • Type: java.lang.String[]
  • Since: 2.2
  • Required: No

<compilerArgs>

Sets the arguments to be passed to the compiler if fork is set to true. Example:

<compilerArgs>
  <arg>-Xmaxerrs</arg>
  <arg>1000</arg>
  <arg>-Xlint</arg>
  <arg>-J-Duser.language=en_us</arg>
</compilerArgs>
  • Type: java.util.List
  • Since: 3.1
  • Required: No

<compilerArgument>

Sets the unformatted single argument string to be passed to the compiler if fork is set to true. To pass multiple arguments such as -Xmaxerrs 1000 (which are actually two arguments) you have to use compilerArguments.

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.0
  • Required: No

<compilerArguments>

Deprecated. use compilerArgs instead.

Sets the arguments to be passed to the 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.

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
  • Since: 2.0.1
  • Required: No

<compilerId>

The compiler id of the compiler to use. See this guide for more information.
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • User Property: maven.compiler.compilerId
  • Default: javac

<compilerReuseStrategy>

Strategy to re use javacc class created:
  • reuseCreated (default): will reuse already created but in case of multi-threaded builds, each thread will have its own instance
  • reuseSame: the same Javacc class will be used for each compilation even for multi-threaded build
  • alwaysNew: a new Javacc class will be created for each compilation
Note this parameter value depends on the os/jdk you are using, but the default value should work on most of env.
  • Type: java.lang.String
  • Since: 2.5
  • Required: No
  • User Property: maven.compiler.compilerReuseStrategy
  • Default: ${reuseCreated}

<compilerVersion>

Version of the compiler to use, ex. "1.3", "1.5", if fork is set to true.
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • User Property: maven.compiler.compilerVersion

<debug>

Set to true to include debugging information in the compiled class files.
  • Type: boolean
  • Since: 2.0
  • Required: No
  • User Property: maven.compiler.debug
  • Default: true

<debuglevel>

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.
  • Type: java.lang.String
  • Since: 2.1
  • Required: No
  • User Property: maven.compiler.debuglevel

<encoding>

The -encoding argument for the Java compiler.
  • Type: java.lang.String
  • Since: 2.1
  • Required: No
  • User Property: encoding
  • Default: ${project.build.sourceEncoding}

<executable>

Sets the executable of the compiler to use when fork is true.
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • User Property: maven.compiler.executable

<failOnError>

Indicates whether the build will continue even if there are compilation errors.
  • Type: boolean
  • Since: 2.0.2
  • Required: No
  • User Property: maven.compiler.failOnError
  • Default: true

<failOnWarning>

Indicates whether the build will continue even if there are compilation warnings.
  • Type: boolean
  • Since: 3.6
  • Required: No
  • User Property: maven.compiler.failOnWarning
  • Default: false

<fileExtensions>

file extensions to check timestamp for incremental build default contains only .class
  • Type: java.util.List
  • Since: 3.1
  • Required: No

<forceJavacCompilerUse>

compiler can now use javax.tools if available in your current jdk, you can disable this feature using -Dmaven.compiler.forceJavacCompilerUse=true or in the plugin configuration
  • Type: boolean
  • Since: 3.0
  • Required: No
  • User Property: maven.compiler.forceJavacCompilerUse
  • 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
  • Since: 2.0
  • Required: 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: No
  • Default: ${project.build.directory}/generated-test-sources/test-annotations

<jdkToolchain>

Specify the requirements for this jdk toolchain. This overrules the toolchain selected by the maven-toolchain-plugin.

note: requires at least Maven 3.3.1
  • Type: java.util.Map
  • Since: 3.6
  • Required: No

<maxmem>

Sets the maximum size, in megabytes, of the memory allocation pool, ex. "128", "128m" if fork is set to true.
  • Type: java.lang.String
  • Since: 2.0.1
  • Required: No
  • User Property: maven.compiler.maxmem

<meminitial>

Initial size, in megabytes, of the memory allocation pool, ex. "64", "64m" if fork is set to true.
  • Type: java.lang.String
  • Since: 2.0.1
  • Required: No
  • User Property: maven.compiler.meminitial

<optimize>

Deprecated. This property is a no-op in javac.
Set to true to optimize the compiled code using the compiler's optimization methods.
  • Type: boolean
  • Since: 2.0
  • Required: No
  • User Property: maven.compiler.optimize
  • Default: false

<outputFileName>

Sets the name of the output file when compiling a set of sources to a single file. expression="${project.build.finalName}"
  • Type: java.lang.String
  • Since: 2.0
  • Required: No

<parameters>

Set to true to generate metadata for reflection on method parameters.
  • Type: boolean
  • Since: 3.6.2
  • Required: 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.
  • Type: java.lang.String
  • Since: 2.2
  • Required: No

<release>

The -release argument for the Java compiler, supported since Java9
  • Type: java.lang.String
  • Since: 3.6
  • Required: No
  • User Property: maven.compiler.release

<showDeprecation>

Sets whether to show source locations where deprecated APIs are used.
  • Type: boolean
  • Since: 2.0
  • Required: No
  • User Property: maven.compiler.showDeprecation
  • Default: false

<showWarnings>

Set to true to show compilation warnings.
  • Type: boolean
  • Since: 2.0
  • Required: No
  • User Property: maven.compiler.showWarnings
  • Default: false

<skip>

Set this to 'true' to bypass compilation of test sources. Its use is NOT RECOMMENDED, but quite convenient on occasion.
  • Type: boolean
  • Since: 2.0
  • Required: No
  • User Property: maven.test.skip

<skipMultiThreadWarning>

(no description)
  • Type: boolean
  • Since: 2.5
  • Required: 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
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • User Property: maven.compiler.source
  • Default: 1.6

<staleMillis>

Sets the granularity in milliseconds of the last modification date for testing whether a source needs recompilation.
  • Type: int
  • Since: 2.0
  • Required: 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
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • User Property: maven.compiler.target
  • Default: 1.6

<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: 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
  • Since: 2.1
  • Required: No

<testExcludes>

A list of exclusion filters for the compiler.
  • Type: java.util.Set
  • Since: 2.0
  • Required: No

<testIncludes>

A list of inclusion filters for the compiler.
  • Type: java.util.Set
  • Since: 2.0
  • Required: No

<testRelease>

the -release argument for the test Java compiler
  • Type: java.lang.String
  • Since: 3.6
  • Required: No
  • User Property: maven.compiler.testRelease

<testSource>

The -source argument for the test Java compiler.
  • Type: java.lang.String
  • Since: 2.1
  • Required: No
  • User Property: maven.compiler.testSource

<testTarget>

The -target argument for the test Java compiler.
  • Type: java.lang.String
  • Since: 2.1
  • Required: No
  • User Property: maven.compiler.testTarget

<useIncrementalCompilation>

to enable/disable incrementation compilation feature
  • Type: boolean
  • Since: 3.1
  • Required: No
  • User Property: maven.compiler.useIncrementalCompilation
  • Default: true

<verbose>

Set to true to show messages about what the compiler is doing.
  • Type: boolean
  • Since: 2.0
  • Required: No
  • User Property: maven.compiler.verbose
  • Default: false

无码av高清毛片在线看_日本一级特黄大片_日本毛片免费视频观看_免费v片在线观看网站