org.apache.tools.ant.taskdefs
public class Patch extends Task
Since: Ant 1.1
UNKNOWN: category="utility"
Method Summary | |
---|---|
void | execute()
execute patch |
void | setBackups(boolean backups)
flag to create backups; optional, default=false |
void | setDestfile(File file)
The name of a file to send the output to, instead of patching
the file(s) in place; optional. |
void | setDir(File directory)
The directory to run the patch command in, defaults to the
project's base directory. |
void | setFailOnError(boolean value)
If true , stop the build process if the patch command
exits with an error status. |
void | setIgnorewhitespace(boolean ignore)
flag to ignore whitespace differences; default=false |
void | setOriginalfile(File file)
The file to patch; optional if it can be inferred from
the diff file |
void | setPatchfile(File file)
The file containing the diff output; required. |
void | setQuiet(boolean q)
Work silently unless an error occurs; optional, default=false |
void | setReverse(boolean r)
Assume patch was created with old and new files swapped; optional,
default=false |
void | setStrip(int num)
Strip the smallest prefix containing num leading slashes
from filenames.
|
Throws: BuildException when it all goes a bit pear shaped
Parameters: backups if true create backups
Parameters: file the file to send the output to
Since: Ant 1.6
Parameters: directory the directory to run the patch command in
Since: Ant 1.5
true
, stop the build process if the patch command
exits with an error status.Parameters: value true
if it should halt, otherwise
false
. The default is false
.
Since: Ant 1.8.0
Parameters: ignore if true ignore whitespace differences
Parameters: file the file to patch
Parameters: file the file containing the diff output
Parameters: q if true suppress set the -s option on the patch command
Parameters: r if true set the -R option on the patch command
patch's -p option.
Parameters: num number of lines to strip
Throws: BuildException if num is < 0, or other errors