Class AbstractCompilerMojo
- All Implemented Interfaces:
org.apache.maven.api.plugin.Mojo
- Direct Known Subclasses:
CompilerMojo,TestCompilerMojo
JavaCompiler interface from JDK 6+.
Each instance shall be used only once, then discarded.- Since:
- 2.0
- Author:
- Trygve Laugstøl, Martin Desruisseaux
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<DependencyCoordinate> Deprecated.protected booleanWhether to use the Maven dependency management section when resolving transitive dependencies of annotation processor paths.protected String[]Class names of annotation processors to run.protected org.apache.maven.api.services.ArtifactManagerprotected PathThe directory to run the compiler from if fork is true.Additional arguments to be passed verbatim to the Java compiler.protected StringDeprecated.UsecompilerArgsinstead.protected StringIdentifier of the compiler to use.protected StringDeprecated, for removal: This API element is subject to removal in a future version.Not supported anymore.protected StringDeprecated, for removal: This API element is subject to removal in a future version.This parameter is no longer used by the underlying compilers.protected booleanWhether to generatepackage-info.classeven when empty.protected booleanWhether to include debugging information in the compiled class files.protected StringKeyword list to be appended to the-gcommand-line switch.protected booleanWhether to enable preview language features of the java compiler.protected StringThe-encodingargument for the Java compiler.protected StringExecutable of the compiler to use whenforkistrue.protected booleanWhether the build will stop if there are compilation errors.protected booleanWhether the build will stop if there are compilation warnings.File extensions to check timestamp for incremental build.protected BooleanDeprecated, for removal: This API element is subject to removal in a future version.Ignored becausejava.lang.Compilerhas been deprecated and removed from the JDK.protected BooleanDeprecated, for removal: This API element is subject to removal in a future version.Ignored because the compiler plugin now always use thejavax.toolsAPI.protected booleanAllows running the compiler in a separate process.protected StringWhether to generate class files for implicitly referenced files.protected StringThe algorithm to use for selecting which files to compile.Requirements for this JDK toolchain for using a differentjavacthan the one of the JDK used by Maven.protected org.apache.maven.api.plugin.LogThe logger for reporting information or warnings to the user.protected StringMaximum size, in megabytes, of the memory allocation pool ifforkis set totrue.protected StringInitial size, in megabytes, of the memory allocation pool ifforkis set totrue.protected org.apache.maven.api.services.MessageBuilderFactoryprotected StringThe--module-versionargument for the Java compiler.protected PathPath to a file where to cache information about the last incremental build.protected BooleanDeprecated, for removal: This API element is subject to removal in a future version.This property is ignored.protected StringDeprecated, for removal: This API element is subject to removal in a future version.Bundling many class files into a single file should be done by other plugins.protected StringDeprecated, for removal: This API element is subject to removal in a future version.Not used by the compiler plugin since it does not generate archive.protected booleanWhether to generate metadata for reflection on method parameters.protected StringWhether annotation processing is performed or not.protected org.apache.maven.api.ProjectThe current project instance.protected org.apache.maven.api.services.ProjectManagerprotected StringThe--releaseargument for the Java compiler.protected org.apache.maven.api.SessionThe current build session instance.protected booleanWhether to provide more details about why a module is rebuilt.protected booleanWhether to show source locations where deprecated APIs are used.protected booleanWhether to show compilation warnings.protected BooleanDeprecated, for removal: This API element is subject to removal in a future version.Deprecated as a consequence ofcompilerReuseStrategydeprecation.protected StringThe--sourceargument for the Java compiler.protected intThe granularity in milliseconds of the last modification date for testing whether a source needs recompilation.protected StringThe--targetargument for the Java compiler.protected org.apache.maven.api.services.ToolchainManagerprotected BooleanDeprecated.Replaced byincrementalCompilation.protected booleanWhether to show messages about what the compiler is doing. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractCompilerMojo(boolean isTestCompile) Creates a new MOJO. -
Method Summary
Modifier and TypeMethodDescriptionprotected OptionsacceptParameters(OptionChecker compiler) Parses the parameters declared in the MOJO.protected voidaddImplicitDependencies(Map<org.apache.maven.api.PathType, List<Path>> addTo, boolean hasModuleDeclaration) Adds dependencies others than the ones declared in POM file.protected voidaddModuleOptions(org.apache.maven.api.services.DependencyResolverResult dependencies, Options addTo) Generates options for handling the given dependencies.voidexecute()Runs the Java compiler.Returns the root directories of Java source files to compile.protected abstract StringReturns the file where to dump the command-line when debug logging is enabled or when the compilation failed.Returns the exclusion filters for the compiler, or an empty list if none.protected abstract PathReturns the path where to place generated source files created by annotation processing.Returns the inclusion filters for the compiler, or an empty list for all Java source files.Returns the exclusion filters for the incremental calculation.protected abstract PathReturns the destination directory (or class output directory) for class files.protected StringReturns the--releaseargument for the Java compiler.protected StringReturns the--sourceargument for the Java compiler.protected StringReturns the--targetargument for the Java compiler.
-
Field Details
-
moduleVersion
@Parameter(property="maven.compiler.moduleVersion", defaultValue="${project.version}") protected String moduleVersionThe--module-versionargument for the Java compiler. This is ignored if not applicable, e.g., in non-modular projects.- Since:
- 4.0.0
- See Also:
-
encoding
@Parameter(property="encoding", defaultValue="${project.build.sourceEncoding}") protected String encodingThe-encodingargument for the Java compiler.- Since:
- 2.1
- See Also:
-
source
The--sourceargument for the Java compiler.Notes:
- 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.
- Since 4.0.0-beta-2 the default value has been removed.
As of Java 9, the
releaseparameter is preferred.
- See Also:
-
target
The--targetargument for the Java compiler.Notes:
- 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.
- Since 4.0.0-beta-2 the default value has been removed.
As of Java 9, the
releaseparameter is preferred.
- See Also:
-
release
The--releaseargument for the Java compiler. If omitted, then the compiler will generate bytecodes for the Java version running the compiler.- Since:
- 3.6
- See Also:
-
enablePreview
@Parameter(property="maven.compiler.enablePreview", defaultValue="false") protected boolean enablePreviewWhether to enable preview language features of the java compiler. Iftrue, then the--enable-previewoption will be added to compiler arguments.- Since:
- 3.10.1
- See Also:
-
compilerArgs
Additional arguments to be passed verbatim to the Java compiler. This parameter can be used when the Maven compiler plugin does not provide a parameter for a Java compiler option. It may happen, for example, for new or preview Java features which are not yet handled by this compiler plugin.If an option has a value, the option and the value shall be specified in two separated
<arg>elements. For example, the-Xmaxerrs 1000option (for setting the maximal number of errors to 1000) can be specified as below (together with other options):
Note that<compilerArgs> <arg>-Xlint</arg> <arg>-Xmaxerrs</arg> <arg>1000</arg> <arg>J-Duser.language=en_us</arg> </compilerArgs>-Joptions should be specified only ifforkis set totrue. Other options can be specified regardless theforkvalue. The compiler plugin does not verify whether the arguments given through this parameter are valid. For this reason, the other parameters provided by the compiler plugin should be preferred when they exist, because the plugin checks whether the corresponding options are supported.- Since:
- 3.1
- See Also:
-
compilerArgument
Deprecated.UsecompilerArgsinstead.The single argument string to be passed to the compiler. To pass multiple arguments such as-Xmaxerrs 1000(which are actually two arguments),compilerArgsis preferred.Note that
-Joptions should be specified only ifforkis set totrue.- See Also:
-
proc
Whether annotation processing is performed or not. If not set, both compilation and annotation processing are performed at the same time. If set, the value will be appended to the-proc:compiler option. Standard values are:none– no annotation processing is performed.only– only annotation processing is done, no compilation.full– annotation processing and compilation are done.
fullwas the default. Starting with JDK 21, this option must be set explicitly.- Since:
- 2.2
- See Also:
-
annotationProcessors
Class names of annotation processors to run. If not set, the default annotation processors discovery process applies. If set, the value will be appended to the-processorcompiler option.- Since:
- 2.2
- See Also:
-
annotationProcessorPaths
Deprecated.Replaced by ordinary dependencies with<type>element set toproc,classpath-procormodular-proc.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 ofannotationProcessors.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
- See Also:
-
annotationProcessorPathsUseDepMgmt
@Parameter(defaultValue="false") protected 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 of transitive dependencies of those top-level paths.
- Since:
- 3.12.0
-
createMissingPackageInfoClass
@Parameter(property="maven.compiler.createMissingPackageInfoClass", defaultValue="false") protected boolean createMissingPackageInfoClassWhether to generatepackage-info.classeven when empty. By default, 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. It may cause a file miss on build systems that check for file existence in order to decide what to recompile.If
true, the-Xpkginfo:alwayscompiler option is added if the compiler supports that extra option. If the extra option is not supported, then a warning is logged and no option is added to the compiler arguments.- Since:
- 3.10
- See Also:
-
implicit
Whether to generate class files for implicitly referenced files. If set, the value will be appended to the-implicit:compiler option. Standard values are:class– automatically generates class files.none– suppresses class file generation.
- Since:
- 3.10.2
- See Also:
-
parameters
@Parameter(property="maven.compiler.parameters", defaultValue="false") protected boolean parametersWhether to generate metadata for reflection on method parameters. Iftrue, the-parametersoption will be added to compiler arguments.- Since:
- 3.6.2
- See Also:
-
debug
@Parameter(property="maven.compiler.debug", defaultValue="true") protected boolean debugWhether to include debugging information in the compiled class files. The amount of debugging information to include is specified by thedebuglevelparameter. If thisdebugflag istrue, then the-goption may be added to compiler arguments with a value determined by thedebuglevelargument. If thisdebugflag isfalse, then the-g:noneoption will be added to the compiler arguments.- See Also:
-
debuglevel
Keyword list to be appended to the-gcommand-line switch. Legal values are a comma-separated list of the following keywords:lines,vars,sourceandall. If debug level is not specified, then the-goption will not by added, which means that the default debugging information will be generated (typicallylinesandsourcebut notvars). Ifdebugis turned off, this attribute will be ignored.- Since:
- 2.1
- See Also:
-
optimize
@Deprecated(forRemoval=true) @Parameter(property="maven.compiler.optimize") protected Boolean optimizeDeprecated, for removal: This API element is subject to removal in a future version.This property is ignored.Whether to optimize the compiled code using the compiler's optimization methods. -
verbose
@Parameter(property="maven.compiler.verbose", defaultValue="false") protected boolean verboseWhether to show messages about what the compiler is doing. Iftrue, then the-verboseoption will be added to compiler arguments.- See Also:
-
showCompilationChanges
@Parameter(property="maven.compiler.showCompilationChanges", defaultValue="false") protected boolean showCompilationChangesWhether to provide more details about why a module is rebuilt. This is used only ifincrementalCompilationis"inputTreeChanges".- See Also:
-
showDeprecation
@Parameter(property="maven.compiler.showDeprecation", defaultValue="false") protected boolean showDeprecationWhether to show source locations where deprecated APIs are used. Iftrue, then the-deprecationoption will be added to compiler arguments. That option is itself a shorthand for-Xlint:deprecation.- See Also:
-
showWarnings
@Parameter(property="maven.compiler.showWarnings", defaultValue="true") protected boolean showWarningsWhether to show compilation warnings. Iffalse, then the-nowarnoption will be added to compiler arguments. That option is itself a shorthand for-Xlint:none.- See Also:
-
failOnWarning
@Parameter(property="maven.compiler.failOnWarning", defaultValue="false") protected boolean failOnWarningWhether the build will stop if there are compilation warnings. Iftrue, then the-Werroroption will be added to compiler arguments.- Since:
- 3.6
- See Also:
-
failOnError
@Parameter(property="maven.compiler.failOnError", defaultValue="true") protected boolean failOnErrorWhether the build will stop if there are compilation errors.- Since:
- 2.0.2
- See Also:
-
outputFileName
Deprecated, for removal: This API element is subject to removal in a future version.Bundling many class files into a single file should be done by other plugins.Sets the name of the output file when compiling a set of sources to a single file.expression="${project.build.finalName}"
-
outputTimestamp
@Deprecated(since="4.0.0", forRemoval=true) @Parameter(defaultValue="${project.build.outputTimestamp}") protected String outputTimestampDeprecated, for removal: This API element is subject to removal in a future version.Not used by the compiler plugin since it does not generate archive.Timestamp for reproducible output archive entries. It can be either formatted as ISO 8601yyyy-MM-dd'T'HH:mm:ssXXXor as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).- Since:
- 3.12.0
-
incrementalCompilation
The algorithm to use for selecting which files to compile. Values can bedependencies,sources,classes,additions,modulesornone.options: recompile all source files if the compiler options changed. Changes are detected on a best-effort basis only.dependencies: recompile all source files if at least one dependency (JAR file) changed since the last build. This check is based on the last modification times of JAR files.sources: recompile source files modified since the last build. In addition, if a source file has been deleted, then all source files are recompiled. This check is based on the modification times of source files rather than the modification times of the*.classfiles.classes: recompile source files (*.java) associated to no output file (*.class) or associated to an output file older than the source. This algorithm does not check if a source file has been removed, potentially leaving non-recompiled classes with references to classes that no longer exist.The
sourcesandclassesvalues are partially redundant, doing the same work in different ways. It is usually not necessary to specify those two values.additions: recompile all source files when the addition of a new file is detected. This aspect should be used together withsourcesorclasses. When used withclasses, it provides a way to detect class renaming (this is not needed withsources).modules: recompile modules and let the compiler decides which individual files to recompile. The compiler plugin does not enumerate the source files to recompile (actually, it does not scan at all the source directories). Instead, it only specifies the module to recompile using the--moduleoption. The Java compiler will scan the source directories itself and compile only those source files that are newer than the corresponding files in the output directory.none: the compiler plugin unconditionally specifies all sources to the Java compiler. This option is mutually exclusive with all other incremental compilation options.Limitations
In all cases, the current compiler-plugin does not detect structural changes other than file addition or removal. For example, the plugin does not detect whether a method has been removed in a class.- Since:
- 4.0.0
- See Also:
-
useIncrementalCompilation
@Deprecated(since="4.0.0") @Parameter(property="maven.compiler.useIncrementalCompilation") protected Boolean useIncrementalCompilationDeprecated.Replaced byincrementalCompilation. A value oftruein this old property is equivalent to"dependencies,sources,additions"in the new property, and a value offalseis equivalent to"classes".Whether to enable/disable incremental compilation feature.- Since:
- 3.1
-
fileExtensions
File extensions to check timestamp for incremental build. Default contains onlyclassandjar. TODO: Rename with a name making clearer that this parameter is about incremental build.- Since:
- 3.1
- See Also:
-
staleMillis
@Parameter(property="lastModGranularityMs", defaultValue="0") protected int staleMillisThe granularity in milliseconds of the last modification date for testing whether a source needs recompilation.- See Also:
-
fork
@Parameter(property="maven.compiler.fork", defaultValue="false") protected boolean forkAllows running the compiler in a separate process. Iffalse, the plugin uses the built-in compiler, while iftrueit will use an executable.- See Also:
-
jdkToolchain
Requirements for this JDK toolchain for using a differentjavacthan the one of the JDK used by Maven. This overrules the toolchain selected by the maven-toolchain-plugin. See Guide to Toolchains for more info.<configuration> <jdkToolchain> <version>11</version> </jdkToolchain> ... </configuration> <configuration> <jdkToolchain> <version>1.8</version> <vendor>zulu</vendor> </jdkToolchain> ... </configuration>- Since:
- 3.6
- See Also:
-
compilerId
Identifier of the compiler to use. This identifier shall match the identifier of a compiler known to the JDK tool chain, or the name of aJavaCompilerinstance registered as a service findable byServiceLoader. See this guide for more information. If unspecified, then the system Java compiler is used. The identifier of the system Java compiler is usuallyjavac.- See Also:
-
compilerVersion
@Deprecated(since="4.0.0", forRemoval=true) @Parameter(property="maven.compiler.compilerVersion") protected String compilerVersionDeprecated, for removal: This API element is subject to removal in a future version.This parameter is no longer used by the underlying compilers.Version of the compiler to use ifforkis set totrue. Examples! "1.3", "1.5".- See Also:
-
forceLegacyJavacApi
@Deprecated(since="4.0.0", forRemoval=true) @Parameter(property="maven.compiler.forceLegacyJavacApi") protected Boolean forceLegacyJavacApiDeprecated, for removal: This API element is subject to removal in a future version.Ignored because the compiler plugin now always use thejavax.toolsAPI.Whether to use the legacycom.sun.tools.javacAPI instead ofjavax.toolsAPI.- Since:
- 3.13
- See Also:
-
forceJavacCompilerUse
@Deprecated(since="4.0.0", forRemoval=true) @Parameter(property="maven.compiler.forceJavacCompilerUse") protected Boolean forceJavacCompilerUseDeprecated, for removal: This API element is subject to removal in a future version.Ignored becausejava.lang.Compilerhas been deprecated and removed from the JDK.Whether to use legacy compiler API.- Since:
- 3.0
-
compilerReuseStrategy
@Deprecated(since="4.0.0", forRemoval=true) @Parameter(property="maven.compiler.compilerReuseStrategy") protected String compilerReuseStrategyDeprecated, for removal: This API element is subject to removal in a future version.Not supported anymore. The reuse ofJavaFileManagerinstance is plugin implementation details.Strategy to re usejavaccclass created. Legal values are: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.
- Since:
- 2.5
-
skipMultiThreadWarning
@Deprecated(since="4.0.0", forRemoval=true) @Parameter(property="maven.compiler.skipMultiThreadWarning") protected Boolean skipMultiThreadWarningDeprecated, for removal: This API element is subject to removal in a future version.Deprecated as a consequence ofcompilerReuseStrategydeprecation.- Since:
- 2.5
-
executable
Executable of the compiler to use whenforkistrue. If this parameter is specified, then thejdkToolchainis ignored.- See Also:
-
meminitial
Initial size, in megabytes, of the memory allocation pool ifforkis set totrue. Examples: "64", "64M". Suffixes "k" (for kilobytes) and "G" (for gigabytes) are also accepted. If no suffix is provided, "M" is assumed.- Since:
- 2.0.1
- See Also:
-
maxmem
Maximum size, in megabytes, of the memory allocation pool ifforkis set totrue. Examples: "128", "128M". Suffixes "k" (for kilobytes) and "G" (for gigabytes) are also accepted. If no suffix is provided, "M" is assumed.- Since:
- 2.0.1
- See Also:
-
basedir
The directory to run the compiler from if fork is true. -
mojoStatusPath
@Parameter(defaultValue="${project.build.directory}/maven-status/${mojo.plugin.descriptor.artifactId}/${mojo.executionId}.cache", required=true, readonly=true) protected Path mojoStatusPathPath to a file where to cache information about the last incremental build. This is used when "incremental" builds are enabled for detecting additions or removals of source files, or changes in plugin configuration. This file should be in the output directory and can be deleted at any time -
session
@Inject protected org.apache.maven.api.Session sessionThe current build session instance. -
project
@Inject protected org.apache.maven.api.Project projectThe current project instance. -
projectManager
@Inject protected org.apache.maven.api.services.ProjectManager projectManager -
artifactManager
@Inject protected org.apache.maven.api.services.ArtifactManager artifactManager -
toolchainManager
@Inject protected org.apache.maven.api.services.ToolchainManager toolchainManager -
messageBuilderFactory
@Inject protected org.apache.maven.api.services.MessageBuilderFactory messageBuilderFactory -
logger
@Inject protected org.apache.maven.api.plugin.Log loggerThe logger for reporting information or warnings to the user. Currently, this is also used for console output.
-
-
Constructor Details
-
AbstractCompilerMojo
protected AbstractCompilerMojo(boolean isTestCompile) Creates a new MOJO.- Parameters:
isTestCompile-truefor compiling tests, orfalsefor compiling the main code
-
-
Method Details
-
getCompileSourceRoots
Returns the root directories of Java source files to compile.. If the sources are organized according the Module Source Hierarchy, then the list shall enumerate the root source directory for each module.- Returns:
- the root directories of Java source files to compile
-
getIncludes
Returns the inclusion filters for the compiler, or an empty list for all Java source files.. The filter patterns are described inFileSystem.getPathMatcher(String). If no syntax is specified, the default syntax is "glob".- Returns:
- the inclusion filters for the compiler, or an empty list for all Java source files
-
getExcludes
Returns the exclusion filters for the compiler, or an empty list if none.. The filter patterns are described inFileSystem.getPathMatcher(String). If no syntax is specified, the default syntax is "glob".- Returns:
- the exclusion filters for the compiler, or an empty list if none
-
getIncrementalExcludes
Returns the exclusion filters for the incremental calculation.. Updated source files, if excluded by this filter, will not cause the project to be rebuilt.- Returns:
- the exclusion filters for the incremental calculation
- See Also:
-
getOutputDirectory
Returns the destination directory (or class output directory) for class files.. This directory will be given to the-dJava compiler option.- Returns:
- the destination directory (or class output directory) for class files
-
getSource
Returns the--sourceargument for the Java compiler.. The default implementation returns thesourcevalue.- Returns:
- the
--sourceargument for the Java compiler
-
getTarget
Returns the--targetargument for the Java compiler.. The default implementation returns thetargetvalue.- Returns:
- the
--targetargument for the Java compiler
-
getRelease
Returns the--releaseargument for the Java compiler.. The default implementation returns thereleasevalue.- Returns:
- the
--releaseargument for the Java compiler
-
getGeneratedSourcesDirectory
Returns the path where to place generated source files created by annotation processing..- Returns:
- the path where to place generated source files created by annotation processing
-
addImplicitDependencies
protected void addImplicitDependencies(Map<org.apache.maven.api.PathType, List<Path>> addTo, boolean hasModuleDeclaration) throws IOExceptionAdds dependencies others than the ones declared in POM file. The typical case is the compilation of tests, which depends on the main compilation outputs. The default implementation does nothing.- Parameters:
addTo- where to add dependencieshasModuleDeclaration- whether the main sources have or should have amodule-infofile- Throws:
IOException- if this method needs to walk through directories and that operation failed
-
addModuleOptions
protected void addModuleOptions(org.apache.maven.api.services.DependencyResolverResult dependencies, Options addTo) throws IOException Generates options for handling the given dependencies. This method should do nothing when compiling the main classes, because themodule-info.javafile should contain all the required configuration. However, this method may need to add some-add-readsoptions when compiling the test classes.- Parameters:
dependencies- the project dependenciesaddTo- where to add the options- Throws:
IOException- if the module information of a dependency cannot be read
-
getDebugFileName
Returns the file where to dump the command-line when debug logging is enabled or when the compilation failed.. For example, if the value is"javac", then the Java compiler can be launched from the command-line by typingjavac @target/javac.args. The debug file will contain the compiler options together with the list of source files to compile.Note: debug logging should not be confused with the
debugflag.- Returns:
- the file where to dump the command-line when debug logging is enabled or when the compilation failed
-
execute
public void execute() throws org.apache.maven.api.plugin.MojoExceptionRuns the Java compiler.- Specified by:
executein interfaceorg.apache.maven.api.plugin.Mojo- Throws:
org.apache.maven.api.plugin.MojoException- if the compiler cannot be run
-
acceptParameters
Parses the parameters declared in the MOJO.- Parameters:
compiler- the tools to use for verifying the validity of options- Returns:
- the options after validation
-
<type>element set toproc,classpath-procormodular-proc.