public class JavaMake
extends org.apache.tools.ant.taskdefs.Javac
Task to selectively compile Java source files using JavaMake. This task is in fact a slightly modified version of the core Javac task, and completely substitutes it. It recognizes all of the parameters that the Javac task takes plus the following additional optional arguments:
jmake.pdb.filename
global property can be used to set it.
JAR
s
are allowed on this class path). When a Java compiler is invoked, it is passed the class path
which is the user class path and project class path merged.
JAR
on a class that has a .java
source. Default
behaviour is to issue a warning.
Modifier and Type | Field and Description |
---|---|
protected org.apache.tools.ant.types.Path |
projClasspath
Class path for all JARs included in this project.
|
protected java.util.List<java.lang.String> |
sourceFileNameList
List of all source file names stored as full paths, for this project.
|
Constructor and Description |
---|
JavaMake() |
Modifier and Type | Method and Description |
---|---|
protected void |
compile()
This method is called by execute() in the superclass, and it invokes a jmake
public API method.
|
int |
compileSourceFiles(java.lang.String[] files)
Compile the given source files using all attributes set for this task.
|
org.apache.tools.ant.types.Path |
createProjClasspath()
Adds a path to the project classpath.
|
void |
execute()
Executes the task.
|
boolean |
getFailOnDependentJar() |
boolean |
getNoWarnOnDependentJar() |
java.lang.String |
getPdbFilename() |
org.apache.tools.ant.types.Path |
getProjClasspath()
Gets the project classpath to be used for this compilation.
|
void |
resetSourceFileNameList()
Clear the list of source file names
|
protected void |
scanDir(java.io.File srcDir,
java.io.File destDir,
java.lang.String[] fileNames)
Extract all .java files from the given file list, prepend their names with srcDir
name, and add to sourceFileNameList.
|
void |
setFailOnDependentJar(boolean v) |
void |
setNoWarnOnDependentJar(boolean v) |
void |
setPdbFilename(java.lang.String v) |
void |
setProjClasspath(org.apache.tools.ant.types.Path classpath)
Set the project classpath to be used for this compilation.
|
void |
setProjClasspathRef(org.apache.tools.ant.types.Reference r)
Adds a reference to a project classpath defined elsewhere.
|
java.lang.String[] |
sourceFileNameListArray()
Return the list of source file names as an array
|
add, checkParameters, createBootclasspath, createClasspath, createCompilerArg, createCompilerClasspath, createExtdirs, createSourcepath, createSrc, getBootclasspath, getClasspath, getCompiler, getCompilerVersion, getCurrentCompilerArgs, getDebug, getDebugLevel, getDepend, getDeprecation, getDestdir, getEncoding, getExecutable, getExtdirs, getFailonerror, getFileList, getIncludeantruntime, getIncludejavaruntime, getJavacExecutable, getListfiles, getMemoryInitialSize, getMemoryMaximumSize, getNowarn, getOptimize, getSource, getSourcepath, getSrcdir, getSystemJavac, getTarget, getTaskSuccess, getTempdir, getVerbose, isForkedJavac, isIncludeDestClasses, isJdkCompiler, recreateSrc, resetFileLists, setBootclasspath, setBootClasspathRef, setClasspath, setClasspathRef, setCompiler, setCreateMissingPackageInfoClass, setDebug, setDebugLevel, setDepend, setDeprecation, setDestdir, setEncoding, setErrorProperty, setExecutable, setExtdirs, setFailonerror, setFork, setIncludeantruntime, setIncludeDestClasses, setIncludejavaruntime, setListfiles, setMemoryInitialSize, setMemoryMaximumSize, setNowarn, setOptimize, setProceed, setSource, setSourcepath, setSourcepathRef, setSrcdir, setTarget, setTempdir, setUpdatedProperty, setVerbose
add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
protected java.util.List<java.lang.String> sourceFileNameList
protected org.apache.tools.ant.types.Path projClasspath
public java.lang.String getPdbFilename()
public void setPdbFilename(java.lang.String v)
public void setProjClasspath(org.apache.tools.ant.types.Path classpath)
classpath
- an Ant Path object containing the project classpath.public org.apache.tools.ant.types.Path getProjClasspath()
public org.apache.tools.ant.types.Path createProjClasspath()
public void setProjClasspathRef(org.apache.tools.ant.types.Reference r)
public boolean getFailOnDependentJar()
public void setFailOnDependentJar(boolean v) throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
public boolean getNoWarnOnDependentJar()
public void setNoWarnOnDependentJar(boolean v) throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
public void resetSourceFileNameList()
public java.lang.String[] sourceFileNameListArray()
public void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.taskdefs.Javac
org.apache.tools.ant.BuildException
protected void scanDir(java.io.File srcDir, java.io.File destDir, java.lang.String[] fileNames)
scanDir
in class org.apache.tools.ant.taskdefs.Javac
protected void compile()
compile
in class org.apache.tools.ant.taskdefs.Javac
public int compileSourceFiles(java.lang.String[] files)