Package org.apache.maven.plugin.compiler
Class CompilerMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugin.compiler.AbstractCompilerMojo
org.apache.maven.plugin.compiler.CompilerMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="compile",
defaultPhase=COMPILE,
threadSafe=true,
requiresDependencyResolution=COMPILE)
public class CompilerMojo
extends AbstractCompilerMojo
Compiles application sources.
By default uses the javac compiler
of the JDK used to execute Maven. This can be overwritten through Toolchains
or parameter
AbstractCompilerMojo.compilerId
.- Since:
- 2.0
- Author:
- Jason van Zyl
- See Also:
-
Field Summary
Fields inherited from class org.apache.maven.plugin.compiler.AbstractCompilerMojo
compilerArgs, compilerArgument, compilerArguments, PS, release, source, target
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
protected String
protected String
protected File
protected File
protected String
protected String
protected org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner
getSourceInclusionScanner
(int staleMillis) protected org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner
getSourceInclusionScanner
(String inputFileEnding) protected String
protected void
preparePaths
(Set<File> sourceFiles) Methods inherited from class org.apache.maven.plugin.compiler.AbstractCompilerMojo
getBuildStartTime, getModuleDeclaration, getProject, getRequestThreadCount, getToolchain, isDependencyChanged, isTestCompile, setRelease, setTarget
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
CompilerMojo
public CompilerMojo()
-
-
Method Details
-
getCompileSourceRoots
- Specified by:
getCompileSourceRoots
in classAbstractCompilerMojo
-
getClasspathElements
- Specified by:
getClasspathElements
in classAbstractCompilerMojo
-
getModulepathElements
- Specified by:
getModulepathElements
in classAbstractCompilerMojo
-
getPathElements
protected Map<String,org.codehaus.plexus.languages.java.jpms.JavaModuleDescriptor> getPathElements()- Specified by:
getPathElements
in classAbstractCompilerMojo
-
getOutputDirectory
- Specified by:
getOutputDirectory
in classAbstractCompilerMojo
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, CompilationFailureException- Specified by:
execute
in interfaceorg.apache.maven.plugin.Mojo
- Overrides:
execute
in classAbstractCompilerMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
CompilationFailureException
-
getIncludes
- Specified by:
getIncludes
in classAbstractCompilerMojo
-
getExcludes
- Specified by:
getExcludes
in classAbstractCompilerMojo
-
preparePaths
- Specified by:
preparePaths
in classAbstractCompilerMojo
-
getSourceInclusionScanner
protected org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner getSourceInclusionScanner(int staleMillis) - Specified by:
getSourceInclusionScanner
in classAbstractCompilerMojo
-
getSourceInclusionScanner
protected org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner getSourceInclusionScanner(String inputFileEnding) - Specified by:
getSourceInclusionScanner
in classAbstractCompilerMojo
-
getSource
- Specified by:
getSource
in classAbstractCompilerMojo
-
getTarget
- Specified by:
getTarget
in classAbstractCompilerMojo
-
getRelease
- Specified by:
getRelease
in classAbstractCompilerMojo
-
getCompilerArgument
- Specified by:
getCompilerArgument
in classAbstractCompilerMojo
-
getCompilerArguments
- Specified by:
getCompilerArguments
in classAbstractCompilerMojo
-
getGeneratedSourcesDirectory
- Specified by:
getGeneratedSourcesDirectory
in classAbstractCompilerMojo
-
getDebugFileName
- Specified by:
getDebugFileName
in classAbstractCompilerMojo
-