Package org.eclipse.jdt.core
Class JDTCompilerAdapter
- java.lang.Object
-
- org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter
-
- org.eclipse.jdt.core.JDTCompilerAdapter
-
- All Implemented Interfaces:
org.apache.tools.ant.taskdefs.compilers.CompilerAdapter
,org.apache.tools.ant.taskdefs.compilers.CompilerAdapterExtension
public class JDTCompilerAdapter extends org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter
Ant 1.5 compiler adapter for the Eclipse Java compiler. This adapter permits the Eclipse Java compiler to be used with thejavac
task in Ant scripts. In order to use it, just set the propertybuild.compiler
as follows:<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
For more information on Ant check out the website at http://jakarta.apache.org/ant/ .
- Since:
- 2.0
-
-
Field Summary
-
Fields inherited from class org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter
attributes, bootclasspath, compileClasspath, compileList, compileSourcepath, debug, depend, deprecation, destDir, encoding, extdirs, includeAntRuntime, includeJavaRuntime, location, lSep, memoryInitialSize, memoryMaximumSize, modulepath, moduleSourcepath, optimize, project, release, src, target, upgrademodulepath, verbose
-
-
Constructor Summary
Constructors Constructor Description JDTCompilerAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
execute()
Performs a compile using the JDT batch compilerprotected void
logAndAddFilesToCompile(org.apache.tools.ant.types.Commandline cmd)
Modified from base class, Logs the compilation parameters, adds the files to compile and logs the "niceSourceList" Appends encoding information at the end of argumentsprotected org.apache.tools.ant.types.Commandline
setupJavacCommand()
-
Methods inherited from class org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter
addCurrentCompilerArgs, addExtdirsToClasspath, assumeJava1_1Plus, assumeJava1_2Plus, assumeJava1_3Plus, assumeJava1_4Plus, assumeJava1_5Plus, assumeJava1_6Plus, assumeJava1_7Plus, assumeJava1_8Plus, assumeJava10Plus, assumeJava11, assumeJava12, assumeJava13, assumeJava14, assumeJava15, assumeJava16, assumeJava17, assumeJava18, assumeJava19, assumeJava9, assumeJava9Plus, executeExternalCompile, executeExternalCompile, getBootClassPath, getCompileClasspath, getJavac, getModulepath, getModulesourcepath, getNoDebugArgument, getProject, getSupportedFileExtensions, getUpgrademodulepath, setJavac, setupJavacCommand, setupJavacCommandlineSwitches, setupJavacCommandlineSwitches, setupModernJavacCommand, setupModernJavacCommandlineSwitches
-
-
-
-
Method Detail
-
execute
public boolean execute() throws org.apache.tools.ant.BuildException
Performs a compile using the JDT batch compiler- Returns:
- boolean true if the compilation is ok, false otherwise
- Throws:
org.apache.tools.ant.BuildException
- if anything wrong happen during the compilation
-
setupJavacCommand
protected org.apache.tools.ant.types.Commandline setupJavacCommand() throws org.apache.tools.ant.BuildException
- Overrides:
setupJavacCommand
in classorg.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter
- Throws:
org.apache.tools.ant.BuildException
-
logAndAddFilesToCompile
protected void logAndAddFilesToCompile(org.apache.tools.ant.types.Commandline cmd)
Modified from base class, Logs the compilation parameters, adds the files to compile and logs the "niceSourceList" Appends encoding information at the end of arguments- Overrides:
logAndAddFilesToCompile
in classorg.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter
- Parameters:
cmd
- the given command line
-
-