|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.maven.plugin.AbstractMojo org.apache.maven.plugin.AbstractCompilerMojo
public abstract class AbstractCompilerMojo
TODO: At least one step could be optimized, currently the plugin will do two scans of all the source code if the compiler has to have the entire set of sources. This is currently the case for at least the C# compiler and most likely all the other .NET compilers too.
Field Summary | |
---|---|
protected String |
compilerArgument
Sets the unformatted single argument string to be passed to the compiler if fork is set to true . |
protected Map<String,String> |
compilerArguments
Sets the arguments to be passed to the compiler (prepending a dash) if fork is set to true . |
protected String |
source
The -source argument for the Java compiler. |
protected String |
target
The -target argument for the Java compiler. |
Fields inherited from interface org.apache.maven.plugin.Mojo |
---|
ROLE |
Constructor Summary | |
---|---|
AbstractCompilerMojo()
|
Method Summary | |
---|---|
void |
execute()
|
protected abstract List<String> |
getClasspathElements()
|
protected abstract String |
getCompilerArgument()
|
protected abstract Map<String,String> |
getCompilerArguments()
|
protected abstract List<String> |
getCompileSourceRoots()
|
protected abstract File |
getGeneratedSourcesDirectory()
|
protected abstract File |
getOutputDirectory()
|
protected abstract String |
getSource()
|
protected abstract SourceInclusionScanner |
getSourceInclusionScanner(int staleMillis)
|
protected abstract SourceInclusionScanner |
getSourceInclusionScanner(String inputFileEnding)
|
protected abstract String |
getTarget()
|
Methods inherited from class org.apache.maven.plugin.AbstractMojo |
---|
getLog, getPluginContext, setLog, setPluginContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String source
protected String target
protected Map<String,String> compilerArguments
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>
protected String 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.
Constructor Detail |
---|
public AbstractCompilerMojo()
Method Detail |
---|
protected abstract SourceInclusionScanner getSourceInclusionScanner(int staleMillis)
protected abstract SourceInclusionScanner getSourceInclusionScanner(String inputFileEnding)
protected abstract List<String> getClasspathElements()
protected abstract List<String> getCompileSourceRoots()
protected abstract File getOutputDirectory()
protected abstract String getSource()
protected abstract String getTarget()
protected abstract String getCompilerArgument()
protected abstract Map<String,String> getCompilerArguments()
protected abstract File getGeneratedSourcesDirectory()
public void execute() throws MojoExecutionException, CompilationFailureException
MojoExecutionException
CompilationFailureException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |