Class AbstractCompilerMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
CompilerMojo
,TestCompilerMojo
- Since:
- 2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List
<DependencyCoordinate> Classpath elements to supply as annotation processor path.private boolean
Whether to use the Maven dependency management section when resolving transitive dependencies of annotation processor paths.private String[]
Names of annotation processors to run.private org.apache.maven.artifact.handler.manager.ArtifactHandlerManager
Artifact handler manager.private File
The directory to run the compiler from if fork is true.private File
The target directory of the compiler if fork is true.Sets the arguments to be passed to the compiler.protected String
Sets the unformatted single argument string to be passed to the compiler.Deprecated.private String
The compiler id of the compiler to use.private org.codehaus.plexus.compiler.manager.CompilerManager
Plexus compiler manager.private String
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 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 Note this parameter value depends on the os/jdk you are using, but the default value should work on most of env.private String
Version of the compiler to use, ex.private boolean
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.private boolean
Set totrue
to include debugging information in the compiled class files.private String
Keyword list to be appended to the-g
command-line switch.(package private) static final String
(package private) static final String
private boolean
Set totrue
to Enable preview language features of the java compilerprivate String
The -encoding argument for the Java compiler.private String
Sets the executable of the compiler to use whenfork
istrue
.private boolean
Indicates whether the build will continue even if there are compilation errors.private boolean
Indicates whether the build will continue even if there are compilation warnings.File extensions to check timestamp for incremental build.private boolean
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 configurationprivate boolean
Allows running the compiler in a separate process.private String
Keyword to be appended to the-implicit:
command-line switch.private static final String
Specify the requirements for this jdk toolchain for using a differentjavac
than the one of the JRE used by Maven.private String
Sets the maximum size, in megabytes, of the memory allocation pool, ex.private String
Initial size, in megabytes, of the memory allocation pool, ex.(package private) static final String
private org.apache.maven.plugin.MojoExecution
private boolean
Deprecated.This property is a no-op injavac
.private String
Sets the name of the output file when compiling a set of sources to a single file.private String
Timestamp for reproducible output archive entries, either formatted as ISO 8601yyyy-MM-dd'T'HH:mm:ssXXX
or as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).private boolean
Set totrue
to generate metadata for reflection on method parameters.private String
Sets whether annotation processing is performed or not.private org.apache.maven.project.MavenProject
The current project instance.protected static final String
protected String
The -release argument for the Java compiler, supported since Java9private org.eclipse.aether.RepositorySystem
Resolves the artifacts needed.private org.apache.maven.execution.MavenSession
The current build session instance.private boolean
private boolean
Sets whether to show source locations where deprecated APIs are used.private boolean
Set tofalse
to disable warnings during compilation.private boolean
protected String
The -source argument for the Java compiler.private int
Sets the granularity in milliseconds of the last modification date for testing whether a source needs recompilation.protected String
The -target argument for the Java compiler.private boolean
private org.apache.maven.toolchain.ToolchainManager
private boolean
to enable/disable incremental compilation feature.private boolean
Set totrue
to show messages about what the compiler is doing.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomputeStaleSources
(org.codehaus.plexus.compiler.CompilerConfiguration compilerConfiguration, org.codehaus.plexus.compiler.Compiler compiler, org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner scanner) private Set
<org.eclipse.aether.graph.Exclusion> convertToAetherExclusions
(Set<DependencyExclusion> exclusions) private List
<org.eclipse.aether.graph.Dependency> convertToDependencies
(List<DependencyCoordinate> annotationProcessorPaths) private void
createMissingPackageInfoClasses
(org.codehaus.plexus.compiler.CompilerConfiguration compilerConfiguration, org.codehaus.plexus.compiler.util.scan.mapping.SourceMapping sourceMapping, Set<File> sources) void
execute()
findManagedVersion
(DependencyCoordinate dependencyCoordinate, List<org.apache.maven.model.Dependency> managedDependencies) private byte[]
generatePackage
(org.codehaus.plexus.compiler.CompilerConfiguration compilerConfiguration, String javaFile) private String
getAnnotationProcessorPathVersion
(DependencyCoordinate annotationProcessorPath) protected Date
protected abstract String
getCompileSources
(org.codehaus.plexus.compiler.Compiler compiler, org.codehaus.plexus.compiler.CompilerConfiguration compilerConfiguration) protected abstract String
protected abstract File
(package private) final String
private List
<org.eclipse.aether.graph.Dependency> private String
private String
getMemoryValue
(String setting) getModuleDeclaration
(Set<File> sourceFiles) private int
getOpcode
(org.codehaus.plexus.compiler.CompilerConfiguration compilerConfiguration) protected abstract File
protected final org.apache.maven.project.MavenProject
private List
<org.apache.maven.model.Dependency> protected abstract String
protected int
try to get thread count if a Maven 3 build, using reflection as the plugin must not be maven3 api dependentprotected abstract String
protected abstract org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner
getSourceInclusionScanner
(int staleMillis) protected abstract org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner
getSourceInclusionScanner
(String inputFileEnding) private org.codehaus.plexus.compiler.util.scan.mapping.SourceMapping
getSourceMapping
(org.codehaus.plexus.compiler.CompilerConfiguration compilerConfiguration, org.codehaus.plexus.compiler.Compiler compiler) protected abstract String
protected final org.apache.maven.toolchain.Toolchain
private boolean
hasInputFileTreeChanged
(org.apache.maven.shared.incremental.IncrementalBuildHelper ibh, Set<File> inputFiles) private boolean
hasNewFile
(Path file, Instant buildStartTime) protected boolean
We just compare the timestamps of all local dependency files (inter-module dependency classpath) and the own generated classes and if we got a file which is >= the build-started timestamp, then we caught a file which got changed during this build.private boolean
private boolean
isSourceChanged
(org.codehaus.plexus.compiler.CompilerConfiguration compilerConfiguration, org.codehaus.plexus.compiler.Compiler compiler) protected boolean
private void
patchJdkModuleVersion
(org.codehaus.plexus.compiler.CompilerResult compilerResult, Set<File> sources) JDK-8318913 workaround: Patch module-info.class to set the java release version for java/jdk modules.protected abstract void
preparePaths
(Set<File> sourceFiles) removeEmptyCompileSourceRoots
(List<String> compileSourceRootsList) void
setRelease
(String release) void
private void
writeConfig
(org.apache.maven.shared.utils.logging.MessageBuilder mb) private void
writePlugin
(org.apache.maven.shared.utils.logging.MessageBuilder mb) Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
PS
-
INPUT_FILES_LST_FILENAME
- See Also:
-
DEFAULT_SOURCE
- See Also:
-
DEFAULT_TARGET
- See Also:
-
MODULE_INFO_TARGET
- See Also:
-
failOnError
@Parameter(property="maven.compiler.failOnError", defaultValue="true") private boolean failOnErrorIndicates whether the build will continue even if there are compilation errors.- Since:
- 2.0.2
-
failOnWarning
@Parameter(property="maven.compiler.failOnWarning", defaultValue="false") private boolean failOnWarningIndicates whether the build will continue even if there are compilation warnings.- Since:
- 3.6
-
debug
@Parameter(property="maven.compiler.debug", defaultValue="true") private boolean debugSet totrue
to include debugging information in the compiled class files. -
parameters
@Parameter(property="maven.compiler.parameters", defaultValue="false") private boolean parametersSet totrue
to generate metadata for reflection on method parameters.- Since:
- 3.6.2
-
enablePreview
@Parameter(property="maven.compiler.enablePreview", defaultValue="false") private boolean enablePreviewSet totrue
to Enable preview language features of the java compiler- Since:
- 3.10.1
-
verbose
@Parameter(property="maven.compiler.verbose", defaultValue="false") private boolean verboseSet totrue
to show messages about what the compiler is doing. -
showDeprecation
@Parameter(property="maven.compiler.showDeprecation", defaultValue="false") private boolean showDeprecationSets whether to show source locations where deprecated APIs are used. -
optimize
@Deprecated @Parameter(property="maven.compiler.optimize", defaultValue="false") private boolean optimizeDeprecated.This property is a no-op injavac
.Set totrue
to optimize the compiled code using the compiler's optimization methods. -
showWarnings
@Parameter(property="maven.compiler.showWarnings", defaultValue="true") private boolean showWarningsSet tofalse
to disable warnings during compilation. -
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
-
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
-
release
The -release argument for the Java compiler, supported since Java9- Since:
- 3.6
-
encoding
@Parameter(property="encoding", defaultValue="${project.build.sourceEncoding}") private String encodingThe -encoding argument for the Java compiler.- Since:
- 2.1
-
staleMillis
@Parameter(property="lastModGranularityMs", defaultValue="0") private int staleMillisSets the granularity in milliseconds of the last modification date for testing whether a source needs recompilation. -
compilerId
The compiler id of the compiler to use. See this guide for more information. -
compilerVersion
Version of the compiler to use, ex. "1.3", "1.5", iffork
is set totrue
. -
fork
@Parameter(property="maven.compiler.fork", defaultValue="false") private boolean forkAllows running the compiler in a separate process. Iffalse
it uses the built in compiler, while iftrue
it will use an executable. -
meminitial
Initial size, in megabytes, of the memory allocation pool, ex. "64", "64m" iffork
is set totrue
.- Since:
- 2.0.1
-
maxmem
Sets the maximum size, in megabytes, of the memory allocation pool, ex. "128", "128m" iffork
is set totrue
.- Since:
- 2.0.1
-
executable
Sets the executable of the compiler to use whenfork
istrue
. -
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.
- Since:
- 2.2
-
annotationProcessors
Names of annotation processors to run. Only applies to JDK 1.6+ If not set, the default annotation processors discovery process applies.
- Since:
- 2.2
-
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.- Since:
- 3.5
-
annotationProcessorPathsUseDepMgmt
@Parameter(defaultValue="false") private boolean annotationProcessorPathsUseDepMgmtWhether 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 o transitive dependencies of those top-level paths.
- Since:
- 3.12.0
-
compilerArguments
Deprecated.usecompilerArgs
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 iffork
is set totrue
.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>
- Since:
- 2.0.1
-
compilerArgs
Sets the arguments to be passed to the compiler.
Note that
Example:-J
options are only passed through iffork
is set totrue
.<compilerArgs> <arg>-Xmaxerrs</arg> <arg>1000</arg> <arg>-Xlint</arg> <arg>-J-Duser.language=en_us</arg> </compilerArgs>
- Since:
- 3.1
-
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 usecompilerArgs
.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 iffork
is set totrue
. -
outputFileName
Sets the name of the output file when compiling a set of sources to a single file. expression="${project.build.finalName}" -
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
, andsource
. 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.- Since:
- 2.1
-
implicit
Keyword to be appended to the-implicit:
command-line switch.- Since:
- 3.10.2
-
toolchainManager
@Component private org.apache.maven.toolchain.ToolchainManager toolchainManager -
jdkToolchain
Specify the requirements for this jdk toolchain for using a different
(see Guide to Toolchains for more info)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- Since:
- 3.6
-
basedir
The directory to run the compiler from if fork is true. -
buildDirectory
@Parameter(defaultValue="${project.build.directory}", required=true, readonly=true) private File buildDirectoryThe target directory of the compiler if fork is true. -
compilerManager
@Component private org.codehaus.plexus.compiler.manager.CompilerManager compilerManagerPlexus compiler manager. -
session
@Parameter(defaultValue="${session}", readonly=true, required=true) private org.apache.maven.execution.MavenSession sessionThe current build session instance. This is used for toolchain manager API calls. -
project
@Parameter(defaultValue="${project}", readonly=true, required=true) private org.apache.maven.project.MavenProject projectThe current project instance. This is used for propagating generated-sources paths as compile/testCompile source roots. -
compilerReuseStrategy
@Parameter(defaultValue="${reuseCreated}", property="maven.compiler.compilerReuseStrategy") private String compilerReuseStrategyStrategy 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 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
- Since:
- 2.5
-
skipMultiThreadWarning
@Parameter(defaultValue="false", property="maven.compiler.skipMultiThreadWarning") private boolean skipMultiThreadWarning- Since:
- 2.5
-
forceJavacCompilerUse
@Parameter(defaultValue="false", property="maven.compiler.forceJavacCompilerUse") private boolean forceJavacCompilerUsecompiler 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- Since:
- 3.0
-
mojoExecution
@Parameter(defaultValue="${mojoExecution}", readonly=true, required=true) private org.apache.maven.plugin.MojoExecution mojoExecution- Since:
- 3.0 needed for storing the status for the incremental build support.
-
fileExtensions
File extensions to check timestamp for incremental build.- Since:
- 3.1
-
useIncrementalCompilation
@Parameter(defaultValue="true", property="maven.compiler.useIncrementalCompilation") private boolean useIncrementalCompilationto 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.
- Since:
- 3.1
-
createMissingPackageInfoClass
@Parameter(defaultValue="true", property="maven.compiler.createMissingPackageInfoClass") private boolean createMissingPackageInfoClassPackage 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 oftrue
causes an empty class file to be generated. This behavior can be changed by setting this parameter tofalse
.- Since:
- 3.10
-
showCompilationChanges
@Parameter(defaultValue="false", property="maven.compiler.showCompilationChanges") private boolean showCompilationChanges -
outputTimestamp
Timestamp for reproducible output archive entries, either formatted as ISO 8601yyyy-MM-dd'T'HH:mm:ssXXX
or as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).- Since:
- 3.12.0
-
repositorySystem
@Component private org.eclipse.aether.RepositorySystem repositorySystemResolves the artifacts needed. -
artifactHandlerManager
@Component private org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManagerArtifact handler manager. -
targetOrReleaseSet
private boolean targetOrReleaseSet
-
-
Constructor Details
-
AbstractCompilerMojo
public AbstractCompilerMojo()
-
-
Method Details
-
getSourceInclusionScanner
protected abstract org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner getSourceInclusionScanner(int staleMillis) -
getSourceInclusionScanner
protected abstract org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner getSourceInclusionScanner(String inputFileEnding) -
getClasspathElements
-
getModulepathElements
-
getPathElements
-
getCompileSourceRoots
-
preparePaths
-
getOutputDirectory
-
getSource
-
getTarget
-
getRelease
-
getCompilerArgument
-
getCompilerArguments
-
getGeneratedSourcesDirectory
-
getDebugFileName
-
getProject
protected final org.apache.maven.project.MavenProject getProject() -
getModuleDeclaration
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, CompilationFailureException- Throws:
org.apache.maven.plugin.MojoExecutionException
CompilationFailureException
-
createMissingPackageInfoClasses
private void createMissingPackageInfoClasses(org.codehaus.plexus.compiler.CompilerConfiguration compilerConfiguration, org.codehaus.plexus.compiler.util.scan.mapping.SourceMapping sourceMapping, Set<File> sources) throws org.codehaus.plexus.compiler.util.scan.InclusionScanException, IOException - Throws:
org.codehaus.plexus.compiler.util.scan.InclusionScanException
IOException
-
generatePackage
private byte[] generatePackage(org.codehaus.plexus.compiler.CompilerConfiguration compilerConfiguration, String javaFile) -
getOpcode
private int getOpcode(org.codehaus.plexus.compiler.CompilerConfiguration compilerConfiguration) -
isTestCompile
protected boolean isTestCompile() -
getCompileSources
private Set<File> getCompileSources(org.codehaus.plexus.compiler.Compiler compiler, org.codehaus.plexus.compiler.CompilerConfiguration compilerConfiguration) throws org.apache.maven.plugin.MojoExecutionException, org.codehaus.plexus.compiler.CompilerException - Returns:
- all source files for the compiler
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.codehaus.plexus.compiler.CompilerException
-
getIncludes
-
getExcludes
-
isSourceChanged
private boolean isSourceChanged(org.codehaus.plexus.compiler.CompilerConfiguration compilerConfiguration, org.codehaus.plexus.compiler.Compiler compiler) - Parameters:
compilerConfiguration
-compiler
-- Returns:
true
if at least a single source file is newer than it's class file
-
getRequestThreadCount
protected int getRequestThreadCount()try to get thread count if a Maven 3 build, using reflection as the plugin must not be maven3 api dependent- Returns:
- number of thread for this build or 1 if not multi-thread build
-
getBuildStartTime
-
getBuildStartTimeInstant
-
getMemoryValue
-
getToolchain
protected final org.apache.maven.toolchain.Toolchain getToolchain() -
isDigits
-
computeStaleSources
private Set<File> computeStaleSources(org.codehaus.plexus.compiler.CompilerConfiguration compilerConfiguration, org.codehaus.plexus.compiler.Compiler compiler, org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner scanner) throws org.apache.maven.plugin.MojoExecutionException, org.codehaus.plexus.compiler.CompilerException - Throws:
org.apache.maven.plugin.MojoExecutionException
org.codehaus.plexus.compiler.CompilerException
-
getSourceMapping
private org.codehaus.plexus.compiler.util.scan.mapping.SourceMapping getSourceMapping(org.codehaus.plexus.compiler.CompilerConfiguration compilerConfiguration, org.codehaus.plexus.compiler.Compiler compiler) throws org.codehaus.plexus.compiler.CompilerException, org.apache.maven.plugin.MojoExecutionException - Throws:
org.codehaus.plexus.compiler.CompilerException
org.apache.maven.plugin.MojoExecutionException
-
removeEmptyCompileSourceRoots
-
isDependencyChanged
protected boolean isDependencyChanged()We just compare the timestamps of all local dependency files (inter-module dependency classpath) and the own generated classes and if we got a file which is >= the build-started timestamp, then we caught a file which got changed during this build.- Returns:
true
if at least one single dependency has changed.
-
hasNewFile
- Parameters:
file
- entry to checkbuildStartTime
- time build start- Returns:
- if any changes occurred
-
resolveProcessorPathEntries
private List<String> resolveProcessorPathEntries() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
convertToDependencies
private List<org.eclipse.aether.graph.Dependency> convertToDependencies(List<DependencyCoordinate> annotationProcessorPaths) throws org.apache.maven.plugin.MojoExecutionException - Throws:
org.apache.maven.plugin.MojoExecutionException
-
getAnnotationProcessorPathVersion
private String getAnnotationProcessorPathVersion(DependencyCoordinate annotationProcessorPath) throws org.apache.maven.plugin.MojoExecutionException - Throws:
org.apache.maven.plugin.MojoExecutionException
-
findManagedVersion
private Optional<String> findManagedVersion(DependencyCoordinate dependencyCoordinate, List<org.apache.maven.model.Dependency> managedDependencies) -
getManagedDependenciesForAnnotationProcessorPaths
private List<org.eclipse.aether.graph.Dependency> getManagedDependenciesForAnnotationProcessorPaths() -
getProjectManagedDependencies
-
convertToAetherExclusions
private Set<org.eclipse.aether.graph.Exclusion> convertToAetherExclusions(Set<DependencyExclusion> exclusions) -
getMavenCompilerPluginVersion
-
setTarget
-
setRelease
-
getImplicit
-
patchJdkModuleVersion
private void patchJdkModuleVersion(org.codehaus.plexus.compiler.CompilerResult compilerResult, Set<File> sources) throws org.apache.maven.plugin.MojoExecutionException JDK-8318913 workaround: Patch module-info.class to set the java release version for java/jdk modules.- Parameters:
compilerResult
- should succeed.sources
- the list of the source files to check for the "module-info.java"- Throws:
org.apache.maven.plugin.MojoExecutionException
- See Also:
-
compilerArgs
instead.