org.apache.tools.ant.taskdefs
public abstract class AbstractCvsTask extends Task
Since: Ant 1.5
Nested Class Summary | |
---|---|
static class | AbstractCvsTask.Module |
Field Summary | |
---|---|
static int | DEFAULT_COMPRESSION_LEVEL
Default compression level to use, if compression is enabled via
setCompression( true ). |
Constructor Summary | |
---|---|
AbstractCvsTask() empty no-arg constructor |
Method Summary | |
---|---|
void | addCommandArgument(String arg)
This needs to be public to allow configuration
of commands externally. |
void | addCommandArgument(Commandline c, String arg)
This method adds a command line argument to an external command.
|
void | addConfiguredCommandline(Commandline c)
Adds direct command-line to execute. |
void | addConfiguredCommandline(Commandline c, boolean insertAtStart)
Configures and adds the given Commandline. |
void | addModule(AbstractCvsTask.Module m)
add a named module/package.
|
protected void | configureCommandline(Commandline c)
Configure a commandline element for things like cvsRoot, quiet, etc. |
void | execute()
do the work |
String | getCommand()
accessor to a command line as string
This should be deprecated
AntoineLL July 23d 2003
|
String | getCvsRoot()
access the CVSROOT variable |
String | getCvsRsh()
access the CVS_RSH variable |
File | getDest()
get the file where the checked out files should be placed
|
protected OutputStream | getErrorStream()
access the stream to which the stderr from cvs should go
if this stream has already been set, it will be returned
if the stream has not yet been set, if the attribute error
has been set, the output stream will go to the file denoted by the error attribute
otherwise the stderr output will go to ant's logging system |
protected ExecuteStreamHandler | getExecuteStreamHandler()
find the handler and instantiate it if it does not exist yet |
protected List | getModules() |
protected OutputStream | getOutputStream()
access the stream to which the stdout from cvs should go
if this stream has already been set, it will be returned
if the stream has not yet been set, if the attribute output
has been set, the output stream will go to the output file
otherwise the output will go to ant's logging system |
String | getPackage()
access the package or module to operate upon
|
File | getPassFile()
find the password file |
int | getPort()
access the port of CVS |
String | getTag()
tag or branch |
protected void | removeCommandline(Commandline c)
remove a particular command from a vector of command lines |
protected void | runCommand(Commandline toExecute)
Sets up the environment for toExecute and then runs it. |
void | setAppend(boolean value)
Whether to append output/error when redirecting to a file. |
void | setCommand(String c)
The CVS command to execute.
|
void | setCompression(boolean usecomp)
If true, this is the same as compressionlevel="3".
|
void | setCompressionLevel(int level)
If set to a value 1-9 it adds -zN to the cvs command line, else
it disables compression. |
void | setCvsRoot(String root)
The CVSROOT variable.
|
void | setCvsRsh(String rsh)
The CVS_RSH variable.
|
void | setDate(String p)
Use the most recent revision no later than the given date. |
void | setDest(File dest)
The directory where the checked out files should be placed.
|
void | setError(File error)
The file to direct standard error from the command.
|
protected void | setErrorStream(OutputStream errorStream)
sets a stream to which the stderr from the cvs exe should go |
void | setExecuteStreamHandler(ExecuteStreamHandler handler)
sets the handler |
void | setFailOnError(boolean failOnError)
Stop the build process if the command exits with
a return code other than 0.
|
void | setNoexec(boolean ne)
If true, report only and don't change any files.
|
void | setOutput(File output)
The file to direct standard output from the command. |
protected void | setOutputStream(OutputStream outputStream)
sets a stream to which the output from the cvs executable should be sent |
void | setPackage(String p)
The package/module to operate upon.
|
void | setPassfile(File passFile)
Password file to read passwords from.
|
void | setPort(int port)
Port used by CVS to communicate with the server.
|
void | setQuiet(boolean q)
If true, suppress informational messages. |
void | setReallyquiet(boolean q)
If true, suppress all messages. |
void | setTag(String p)
The tag of the package/module to operate upon. |
Parameters: arg command argument
Parameters: c command line to which one argument should be added arg argument to add
Parameters: c command line to execute
Parameters: c commandline to insert insertAtStart If true, c is inserted at the beginning of the vector of command lines
Since: Ant 1.8.0
Parameters: c the command line which will be configured
if the commandline is initially null, the function is a noop
otherwise the function append to the commandline arguments concerning
Throws: BuildException if failonerror is set to true and the cvs command fails.
Returns: command line as string
Returns: CVSROOT
Returns: the CVS_RSH variable
Returns: directory where the checked out files should be placed
Returns: output stream to which cvs' stderr should go to
Returns: handler for output and error streams
Returns: output stream to which cvs' stdout should go to
Returns: package/module
Returns: password file
Returns: the port of CVS
Returns: tag or branch
Since: ant 1.6.1
Parameters: c command line which should be removed
Parameters: toExecute the command line to execute
Throws: BuildException if failonError is set to true and the cvs command fails
Parameters: value true indicated you want to append
Parameters: c a command as string
Parameters: usecomp If true, turns on compression using default level, AbstractCvsTask.DEFAULT_COMPRESSION_LEVEL.
Parameters: level compression level 1 to 9
Parameters: root the CVSROOT variable
Parameters: rsh the CVS_RSH variable
Parameters: p a date as string in a format that the CVS executable can understand see man cvs
Note that this is different from CVS's -d command line switch as Ant will never shorten pathnames to avoid empty directories.
Parameters: dest directory where the checked out files should be placed
Parameters: error a file to which stderr should go
Parameters: errorStream an output stream willing to process stderr
Parameters: handler a handler able of processing the output and error streams from the cvs exe
Parameters: failOnError stop the build process if the command exits with a return code other than 0
Parameters: ne if true, report only and do not change any files.
Parameters: output a file to which stdout should go
Parameters: outputStream stream to which the stdout from cvs should go
Parameters: p package or module to operate upon
Parameters: passFile password file to read passwords from
Parameters: port port of CVS
Parameters: q if true, suppress informational messages
Parameters: q if true, suppress all messages
Since: Ant 1.6
Parameters: p tag