Package org.codehaus.plexus.compiler
Class CompilerConfiguration
java.lang.Object
org.codehaus.plexus.compiler.CompilerConfiguration
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Re-use strategy of the compiler (implement for java only). -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String[]
-processor parameters in jdk 1.6+private File
A build temporary directory, eg target/.default valueCompilerConfiguration.CompilerReuseStrategy.ReuseCreated
private String
private Collection<Map.Entry<String,
String>> private boolean
private String
private String
private boolean
-Werror argument as supported since Java 1.7private boolean
force usage of old JavacCompiler even if javax.tools is detectedprivate boolean
private File
in jdk 1.6+, used to hold value of the -s path parameter.private String
private String
private String
value of --module-version parameter in java 9+private boolean
private String
Used to control the name of the output file when compiling a set of sources to a single file.private String
private boolean
private String
value of the -proc parameter in jdk 1.6+-processorpath parameter in jdk 1.6+.private String
value of -release parameter in java 9+private boolean
private boolean
private String
private String
private String
private boolean
private File
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addClasspathEntry
(String classpathEntry) void
addCompilerCustomArgument
(String customArgument, String value) void
addExclude
(String exclude) void
addInclude
(String include) void
addModulepathEntry
(String modulepathEntry) void
addProcessorPathEntry
(String entry) -processorpath parameter in jdk 1.6+.void
addSourceLocation
(String sourceLocation) String[]
Deprecated.will be removed in 2.X use #getCustomCompilerArgumentsAsMapGet all unique argument keys and their value.In case argument keys are not unique, this will return all entriesgetProc()
-processorpath parameter in jdk 1.6+.boolean
isDebug()
boolean
boolean
boolean
isFork()
boolean
boolean
boolean
boolean
boolean
void
setAnnotationProcessors
(String[] annotationProcessors) void
setBuildDirectory
(File buildDirectory) void
setClasspathEntries
(List<String> classpathEntries) void
setCompilerReuseStrategy
(CompilerConfiguration.CompilerReuseStrategy compilerReuseStrategy) void
setCompilerVersion
(String compilerVersion) void
setCustomCompilerArguments
(LinkedHashMap<String, String> customCompilerArguments) Deprecated.will be removed in 2.X use #setCustomCompilerArgumentsAsMapvoid
setCustomCompilerArgumentsAsMap
(Map<String, String> customCompilerArguments) void
setDebug
(boolean debug) void
setDebugLevel
(String debugLevel) void
setExcludes
(Set<String> excludes) void
setExecutable
(String executable) void
setFailOnWarning
(boolean failOnWarnings) void
setForceJavacCompilerUse
(boolean forceJavacCompilerUse) void
setFork
(boolean fork) void
setGeneratedSourcesDirectory
(File generatedSourcesDirectory) void
setIncludes
(Set<String> includes) void
void
setMeminitial
(String meminitial) void
setModulepathEntries
(List<String> modulepathEntries) void
setModuleVersion
(String moduleVersion) void
setOptimize
(boolean optimize) void
setOutputFileName
(String outputFileName) void
setOutputLocation
(String outputLocation) void
setParameters
(boolean parameters) void
void
setProcessorPathEntries
(List<String> processorPathEntries) -processorpath parameter in jdk 1.6+.void
setReleaseVersion
(String releaseVersion) void
setShowDeprecation
(boolean showDeprecation) void
setShowWarnings
(boolean showWarnings) void
setSourceEncoding
(String sourceEncoding) void
setSourceFiles
(Set<File> sourceFiles) void
setSourceLocations
(List<String> sourceLocations) void
setSourceVersion
(String sourceVersion) void
setTargetVersion
(String targetVersion) void
setVerbose
(boolean verbose) void
setWorkingDirectory
(File workingDirectory)
-
Field Details
-
outputLocation
-
classpathEntries
-
modulepathEntries
-
sourceFiles
-
sourceLocations
-
includes
-
excludes
-
debug
private boolean debug -
debugLevel
-
showWarnings
private boolean showWarnings -
failOnWarning
private boolean failOnWarning-Werror argument as supported since Java 1.7 -
showDeprecation
private boolean showDeprecation -
sourceVersion
-
targetVersion
-
releaseVersion
value of -release parameter in java 9+ -
sourceEncoding
-
moduleVersion
value of --module-version parameter in java 9+ -
customCompilerArguments
-
fork
private boolean fork -
optimize
private boolean optimize -
meminitial
-
maxmem
-
executable
-
workingDirectory
-
compilerVersion
-
verbose
private boolean verbose -
parameters
private boolean parameters- Since:
- 2.8.2
-
buildDirectory
A build temporary directory, eg target/. Used by the compiler implementation to put temporary files. -
outputFileName
Used to control the name of the output file when compiling a set of sources to a single file. -
generatedSourcesDirectory
in jdk 1.6+, used to hold value of the -s path parameter. -
proc
value of the -proc parameter in jdk 1.6+ -
annotationProcessors
-processor parameters in jdk 1.6+ -
processorPathEntries
-processorpath parameter in jdk 1.6+. If specified, annotation processors are only searched in the processor path. Otherwise they are searched in the classpath. -
compilerReuseStrategy
default valueCompilerConfiguration.CompilerReuseStrategy.ReuseCreated
- Since:
- 1.9
-
forceJavacCompilerUse
private boolean forceJavacCompilerUseforce usage of old JavacCompiler even if javax.tools is detected- Since:
- 2.0
-
-
Constructor Details
-
CompilerConfiguration
public CompilerConfiguration()
-
-
Method Details
-
setOutputLocation
-
getOutputLocation
-
addClasspathEntry
-
setClasspathEntries
-
getClasspathEntries
-
addModulepathEntry
-
setModulepathEntries
-
getModulepathEntries
-
setSourceFiles
-
getSourceFiles
-
addSourceLocation
-
setSourceLocations
-
getSourceLocations
-
addInclude
-
setIncludes
-
getIncludes
-
addExclude
-
setExcludes
-
getExcludes
-
setDebug
public void setDebug(boolean debug) -
isDebug
public boolean isDebug() -
setDebugLevel
-
getDebugLevel
-
setShowWarnings
public void setShowWarnings(boolean showWarnings) -
isShowWarnings
public boolean isShowWarnings() -
isShowDeprecation
public boolean isShowDeprecation() -
setShowDeprecation
public void setShowDeprecation(boolean showDeprecation) -
isFailOnWarning
public boolean isFailOnWarning() -
setFailOnWarning
public void setFailOnWarning(boolean failOnWarnings) -
getSourceVersion
-
setSourceVersion
-
getTargetVersion
-
setTargetVersion
-
getReleaseVersion
-
setReleaseVersion
-
getSourceEncoding
-
setSourceEncoding
-
getModuleVersion
-
setModuleVersion
-
addCompilerCustomArgument
-
getCustomCompilerArguments
Deprecated.will be removed in 2.X use #getCustomCompilerArgumentsAsMap- Returns:
-
setCustomCompilerArguments
@Deprecated public void setCustomCompilerArguments(LinkedHashMap<String, String> customCompilerArguments) Deprecated.will be removed in 2.X use #setCustomCompilerArgumentsAsMap- Parameters:
customCompilerArguments
-
-
getCustomCompilerArgumentsAsMap
Get all unique argument keys and their value. In case of duplicate keys, last one added wins.- Returns:
- See Also:
-
setCustomCompilerArgumentsAsMap
-
getCustomCompilerArgumentsEntries
In case argument keys are not unique, this will return all entries- Returns:
-
isFork
public boolean isFork() -
setFork
public void setFork(boolean fork) -
getMeminitial
-
setMeminitial
-
getMaxmem
-
setMaxmem
-
getExecutable
-
setExecutable
-
getWorkingDirectory
-
setWorkingDirectory
-
getBuildDirectory
-
setBuildDirectory
-
getOutputFileName
-
setOutputFileName
-
isOptimize
public boolean isOptimize() -
setOptimize
public void setOptimize(boolean optimize) -
getCompilerVersion
-
setCompilerVersion
-
isVerbose
public boolean isVerbose() -
setVerbose
public void setVerbose(boolean verbose) -
isParameters
public boolean isParameters() -
setParameters
public void setParameters(boolean parameters) -
setProc
-
setGeneratedSourcesDirectory
-
getGeneratedSourcesDirectory
-
getProc
-
setAnnotationProcessors
-
getAnnotationProcessors
-
addProcessorPathEntry
-processorpath parameter in jdk 1.6+. If specified, annotation processors are only searched in the processor path. Otherwise they are searched in the classpath.- Parameters:
entry
- processor path entry to add
-
getProcessorPathEntries
-processorpath parameter in jdk 1.6+. If specified, annotation processors are only searched in the processor path. Otherwise they are searched in the classpath.- Returns:
- the processorPathEntries
-
setProcessorPathEntries
-processorpath parameter in jdk 1.6+. If specified, annotation processors are only searched in the processor path. Otherwise they are searched in the classpath.- Parameters:
processorPathEntries
- the processorPathEntries to set
-
getCompilerReuseStrategy
-
setCompilerReuseStrategy
public void setCompilerReuseStrategy(CompilerConfiguration.CompilerReuseStrategy compilerReuseStrategy) -
isForceJavacCompilerUse
public boolean isForceJavacCompilerUse() -
setForceJavacCompilerUse
public void setForceJavacCompilerUse(boolean forceJavacCompilerUse)
-