|
ExecuteOn (Apache Ant API)
org.apache.tools.ant.taskdefs
|
Nested Class Summary | |
static class |
ExecuteOn.FileDirBoth
Enumerated attribute with the values "file", "dir" and "both" for the type attribute. |
Field Summary | |
protected java.io.File |
destDir
|
protected java.util.Vector |
filesets
|
protected FileNameMapper |
mapper
|
protected Mapper |
mapperElement
|
protected Commandline.Marker |
srcFilePos
|
protected boolean |
srcIsFirst
Has <srcfile> been specified before <targetfile> |
protected Commandline.Marker |
targetFilePos
|
protected java.lang.String |
type
|
Fields inherited from class org.apache.tools.ant.taskdefs.ExecTask |
cmdl, failOnError, newEnvironment |
Fields inherited from class org.apache.tools.ant.Task |
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Constructor Summary | |
ExecuteOn()
|
Method Summary | |
void |
addFileset(FileSet set)
Source files to operate upon. |
protected void |
checkConfiguration()
Has the user set all necessary attributes? |
Mapper |
createMapper()
Mapper to use for mapping source files to target files. |
Commandline.Marker |
createSrcfile()
Marker that indicates where the name of the source file should be put on the command line. |
Commandline.Marker |
createTargetfile()
Marker that indicates where the name of the target file should be put on the command line. |
protected java.lang.String[] |
getCommandline(java.lang.String[] srcFiles,
java.io.File[] baseDirs)
Construct the command line for parallel execution. |
protected java.lang.String[] |
getCommandline(java.lang.String srcFile,
java.io.File baseDir)
Construct the command line for serial execution. |
protected java.lang.String[] |
getDirs(java.io.File baseDir,
DirectoryScanner ds)
Return the list of Directories from this DirectoryScanner that should be included on the command line. |
protected java.lang.String[] |
getFiles(java.io.File baseDir,
DirectoryScanner ds)
Return the list of files from this DirectoryScanner that should be included on the command line. |
protected void |
runExec(Execute exe)
Run the command using the given Execute instance. |
void |
setDest(java.io.File destDir)
The directory where target files are to be placed. |
void |
setParallel(boolean parallel)
If true, run the command only once, appending all files as arguments. |
void |
setRelative(boolean relative)
Whether the filenames should be passed on the command line as absolute or relative pathnames. |
void |
setSkipEmptyFilesets(boolean skip)
If no source files have been found or are newer than their corresponding target files, do not run the command. |
void |
setType(ExecuteOn.FileDirBoth type)
Whether the command works only on files, directories or both? |
Methods inherited from class org.apache.tools.ant.taskdefs.ExecTask |
addEnv, createArg, createHandler, createWatchdog, execute, isValidOs, logFlush, maybeSetResultPropertyValue, prepareExec, runExecute, setAppend, setCommand, setDir, setExecutable, setFailIfExecutionFails, setFailonerror, setNewenvironment, setOs, setOutput, setOutputproperty, setResultProperty, setTimeout, setTimeout, setVMLauncher |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject, setProject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Vector filesets
protected java.lang.String type
protected Commandline.Marker srcFilePos
protected Commandline.Marker targetFilePos
protected Mapper mapperElement
protected FileNameMapper mapper
protected java.io.File destDir
protected boolean srcIsFirst
Constructor Detail |
public ExecuteOn()
Method Detail |
public void addFileset(FileSet set)
public void setRelative(boolean relative)
public void setParallel(boolean parallel)
public void setType(ExecuteOn.FileDirBoth type)
public void setSkipEmptyFilesets(boolean skip)
public void setDest(java.io.File destDir)
public Commandline.Marker createSrcfile()
public Commandline.Marker createTargetfile()
public Mapper createMapper() throws BuildException
protected void checkConfiguration()
ExecTask
checkConfiguration
in class ExecTask
protected void runExec(Execute exe) throws BuildException
ExecTask
protected java.lang.String[] getCommandline(java.lang.String[] srcFiles, java.io.File[] baseDirs)
srcFiles
- The filenames to add to the commandlineprotected java.lang.String[] getCommandline(java.lang.String srcFile, java.io.File baseDir)
srcFile
- The filename to add to the commandlinebaseDir
- filename is relative to this dirprotected java.lang.String[] getFiles(java.io.File baseDir, DirectoryScanner ds)
protected java.lang.String[] getDirs(java.io.File baseDir, DirectoryScanner ds)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |