Note
This implementation has been moved here from Cvs.java with the addition of some accessors for extensibility. Another task can extend this with some customized output processing.
| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | append
whether or not to append stdout/stderr to existing files |
| private Commandline | |
| private String | command
the CVS command to execute. |
| private List | commandlines
list of Commandline children |
| private int | compression
compression level to use. |
| private String | cvsPackage
the package/module to check out. |
| private String | cvsRoot
the CVSROOT variable. |
| private String | cvsRsh
the CVS_RSH variable. |
| private static final String | DEFAULT_COMMAND
the default command. |
| public static final int | DEFAULT_COMPRESSION_LEVEL
Default compression level to use, if compression is enabled via setCompression(true). |
| private File | dest
the directory where the checked out files should be placed. |
| private File | error
the file to direct standard error from the command. |
| private OutputStream | |
| private ExecuteStreamHandler | executeStreamHandler
Create accessors for the following, to allow different handling of the output. |
| private boolean | failOnError
If true it will stop the build if cvs exits with error. |
| private static final int | |
| private List | |
| private boolean | noexec
report only, don't change any files. |
| private File | output
the file to direct standard output from the command. |
| private OutputStream | |
| private File | passFile
CVS password file |
| private int | port
CVS port |
| private boolean | quiet
suppress information messages. |
| private boolean | reallyquiet
suppress all messages. |
| private String | tag
the tag |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addCommandArgument(String
command argument arg)This needs to be public to allow configuration of commands externally. |
| public void | addCommandArgument(Commandline
command line to which one argument should be added c, String argument to add arg)This method adds a command line argument to an external command. |
| public void | |
| public void | addConfiguredCommandline(Commandline
commandline to insert c, boolean If true, c is
inserted at the beginning of the vector of command lines insertAtStart)Configures and adds the given Commandline. |
| public void | |
| protected void | configureCommandline(Commandline
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
c)
Configure a commandline element for things like cvsRoot, quiet, etc. |
| public void | |
| private String | |
| public String | Returns: command line as stringaccessor to a command line as string This should be deprecated AntoineLL July 23d 2003 |
| public String | |
| public String | |
| public File | Returns: directory where the checked out files should be placedget the file where the checked out files should be placed |
| protected OutputStream | Returns: output stream to which cvs' stderr should go toaccess 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 | Returns: handler for output and error streamsfind the handler and instantiate it if it does not exist yet |
| protected List | |
| protected OutputStream | Returns: output stream to which cvs' stdout should go toaccess 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 |
| public String | |
| public File | |
| public int | |
| public String | |
| protected void | removeCommandline(Commandline
command line which should be removed c)remove a particular command from a vector of command lines |
| private StringBuilder | Returns: a StringBuffer where the password has been removed (if available)the CVS command line cmdLine)Removes the cvs password from the command line, if given on the command line. |
| protected void | runCommand(Commandline
the command line to execute toExecute)Sets up the environment for toExecute and then runs it. |
| public void | setAppend(boolean
true indicated you want to append value)Whether to append output/error when redirecting to a file. |
| public void | |
| public void | setCompression(boolean
If true, turns on compression using default
level, AbstractCvsTask.DEFAULT_COMPRESSION_LEVEL. usecomp)If true, this is the same as compressionlevel="3". |
| public void | setCompressionLevel(int
compression level 1 to 9 level)If set to a value 1-9 it adds -zN to the cvs command line, else it disables compression. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| protected void | setErrorStream(OutputStream
an output stream willing to process stderr errorStream)sets a stream to which the stderr from the cvs exe should go |
| public void | setExecuteStreamHandler(ExecuteStreamHandler
a handler able of processing the output and error streams from the cvs exe handler)sets the handler |
| public void | setFailOnError(boolean
stop the build process if the command exits with
a return code other than 0 failOnError)Stop the build process if the command exits with a return code other than 0. |
| public void | setNoexec(boolean
if true, report only and do not change any files. ne)If true, report only and don't change any files. |
| public void | |
| protected void | setOutputStream(OutputStream
stream to which the stdout from cvs should go outputStream)sets a stream to which the output from the cvs executable should be sent |
| public void | |
| public void | |
| public void | |
| public void | setQuiet(boolean
if true, suppress informational messages q)If true, suppress informational messages. |
| public void | |
| public void |
| append | back to summary |
|---|---|
| private boolean append whether or not to append stdout/stderr to existing files | |
| cmd | back to summary |
|---|---|
| private Commandline cmd | |
| command | back to summary |
|---|---|
| private String command the CVS command to execute. | |
| commandlines | back to summary |
|---|---|
| private List<Commandline> commandlines list of Commandline children | |
| compression | back to summary |
|---|---|
| private int compression compression level to use. | |
| cvsPackage | back to summary |
|---|---|
| private String cvsPackage the package/module to check out. | |
| cvsRoot | back to summary |
|---|---|
| private String cvsRoot the CVSROOT variable. | |
| cvsRsh | back to summary |
|---|---|
| private String cvsRsh the CVS_RSH variable. | |
| DEFAULT_COMMAND | back to summary |
|---|---|
| private static final String DEFAULT_COMMAND the default command. | |
| DEFAULT_COMPRESSION_LEVEL | back to summary |
|---|---|
| public static final int DEFAULT_COMPRESSION_LEVEL Default compression level to use, if compression is enabled via setCompression(true). | |
| dest | back to summary |
|---|---|
| private File dest the directory where the checked out files should be placed. | |
| error | back to summary |
|---|---|
| private File error the file to direct standard error from the command. | |
| errorStream | back to summary |
|---|---|
| private OutputStream errorStream | |
| executeStreamHandler | back to summary |
|---|---|
| private ExecuteStreamHandler executeStreamHandler Create accessors for the following, to allow different handling of the output. | |
| failOnError | back to summary |
|---|---|
| private boolean failOnError If true it will stop the build if cvs exits with error. Default is false. (Iulian) | |
| MAXIMUM_COMRESSION_LEVEL | back to summary |
|---|---|
| private static final int MAXIMUM_COMRESSION_LEVEL | |
| modules | back to summary |
|---|---|
| private List<AbstractCvsTask. | |
| noexec | back to summary |
|---|---|
| private boolean noexec report only, don't change any files. | |
| output | back to summary |
|---|---|
| private File output the file to direct standard output from the command. | |
| outputStream | back to summary |
|---|---|
| private OutputStream outputStream | |
| passFile | back to summary |
|---|---|
| private File passFile CVS password file | |
| port | back to summary |
|---|---|
| private int port CVS port | |
| quiet | back to summary |
|---|---|
| private boolean quiet suppress information messages. | |
| reallyquiet | back to summary |
|---|---|
| private boolean reallyquiet suppress all messages. | |
| tag | back to summary |
|---|---|
| private String tag the tag | |
| AbstractCvsTask | back to summary |
|---|---|
| public AbstractCvsTask() | |
| addCommandArgument | back to summary |
|---|---|
| public void addCommandArgument(String arg) This needs to be public to allow configuration of commands externally.
| |
| addCommandArgument | back to summary |
|---|---|
| public void addCommandArgument(Commandline c, String arg) This method adds a command line argument to an external command. I do not understand what this method does in this class ??? particularly not why it is public ???? AntoineLL July 23d 2003
| |
| addConfiguredCommandline | back to summary |
|---|---|
| public void addConfiguredCommandline(Commandline c) Adds direct command-line to execute.
| |
| addConfiguredCommandline | back to summary |
|---|---|
| public void addConfiguredCommandline(Commandline c, boolean insertAtStart) Configures and adds the given Commandline.
| |
| addModule | back to summary |
|---|---|
| public void addModule(AbstractCvsTask. add a named module/package.
| |
| configureCommandline | back to summary |
|---|---|
| protected void configureCommandline(Commandline c) Configure a commandline element for things like cvsRoot, quiet, etc.
| |
| execute | back to summary |
|---|---|
| public void execute() throws BuildException Overrides org. do the work
| |
| executeToString | back to summary |
|---|---|
| private String executeToString(Execute execute) | |
| getCommand | back to summary |
|---|---|
| public String getCommand() accessor to a command line as string This should be deprecated AntoineLL July 23d 2003
| |
| getCvsRoot | back to summary |
|---|---|
| public String getCvsRoot() access the CVSROOT variable
| |
| getCvsRsh | back to summary |
|---|---|
| public String getCvsRsh() access the CVS_RSH variable
| |
| getDest | back to summary |
|---|---|
| public File getDest() get the file where the checked out files should be placed
| |
| getErrorStream | back to summary |
|---|---|
| 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
| |
| getExecuteStreamHandler | back to summary |
|---|---|
| protected ExecuteStreamHandler getExecuteStreamHandler() find the handler and instantiate it if it does not exist yet
| |
| getModules | back to summary |
|---|---|
| protected List | |
| getOutputStream | back to summary |
|---|---|
| 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
| |
| getPackage | back to summary |
|---|---|
| public String getPackage() access the package or module to operate upon
| |
| getPassFile | back to summary |
|---|---|
| public File getPassFile() find the password file
| |
| getPort | back to summary |
|---|---|
| public int getPort() access the port of CVS
| |
| getTag | back to summary |
|---|---|
| public String getTag() tag or branch
| |
| removeCommandline | back to summary |
|---|---|
| protected void removeCommandline(Commandline c) remove a particular command from a vector of command lines
| |
| removeCvsPassword | back to summary |
|---|---|
| private StringBuilder removeCvsPassword(String cmdLine) Removes the cvs password from the command line, if given on the command line. This password can be given on the command line in the cvsRoot -d:pserver:user:password@server:path It has to be noted that the password may be omitted altogether.
| |
| runCommand | back to summary |
|---|---|
| protected void runCommand(Commandline toExecute) throws BuildException Sets up the environment for toExecute and then runs it.
| |
| setAppend | back to summary |
|---|---|
| public void setAppend(boolean value) Whether to append output/error when redirecting to a file.
| |
| setCommand | back to summary |
|---|---|
| public void setCommand(String c) The CVS command to execute. This should be deprecated, it is better to use the Commandline class ? AntoineLL July 23d 2003
| |
| setCompression | back to summary |
|---|---|
| public void setCompression(boolean usecomp) If true, this is the same as compressionlevel="3".
| |
| setCompressionLevel | back to summary |
|---|---|
| public void setCompressionLevel(int level) If set to a value 1-9 it adds -zN to the cvs command line, else it disables compression.
| |
| setCvsRoot | back to summary |
|---|---|
| public void setCvsRoot(String root) The CVSROOT variable.
| |
| setCvsRsh | back to summary |
|---|---|
| public void setCvsRsh(String rsh) The CVS_RSH variable.
| |
| setDate | back to summary |
|---|---|
| public void setDate(String p) Use the most recent revision no later than the given date.
| |
| setDest | back to summary |
|---|---|
| public void setDest(File dest) The directory where the checked out files should be placed. Note that this is different from CVS's -d command line switch as Ant will never shorten pathnames to avoid empty directories.
| |
| setError | back to summary |
|---|---|
| public void setError(File error) The file to direct standard error from the command.
| |
| setErrorStream | back to summary |
|---|---|
| protected void setErrorStream(OutputStream errorStream) sets a stream to which the stderr from the cvs exe should go
| |
| setExecuteStreamHandler | back to summary |
|---|---|
| public void setExecuteStreamHandler(ExecuteStreamHandler handler) sets the handler
| |
| setFailOnError | back to summary |
|---|---|
| public void setFailOnError(boolean failOnError) Stop the build process if the command exits with a return code other than 0. Defaults to false.
| |
| setNoexec | back to summary |
|---|---|
| public void setNoexec(boolean ne) If true, report only and don't change any files.
| |
| setOutput | back to summary |
|---|---|
| public void setOutput(File output) The file to direct standard output from the command.
| |
| setOutputStream | back to summary |
|---|---|
| protected void setOutputStream(OutputStream outputStream) sets a stream to which the output from the cvs executable should be sent
| |
| setPackage | back to summary |
|---|---|
| public void setPackage(String p) The package/module to operate upon.
| |
| setPassfile | back to summary |
|---|---|
| public void setPassfile(File passFile) Password file to read passwords from.
| |
| setPort | back to summary |
|---|---|
| public void setPort(int port) Port used by CVS to communicate with the server.
| |
| setQuiet | back to summary |
|---|---|
| public void setQuiet(boolean q) If true, suppress informational messages.
| |
| setReallyquiet | back to summary |
|---|---|
| public void setReallyquiet(boolean q) If true, suppress all messages.
| |
| setTag | back to summary |
|---|---|
| public void setTag(String p) The tag of the package/module to operate upon.
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public void |
| name | back to summary |
|---|---|
| private String name | |
| Module | back to summary |
|---|---|
| public Module() | |
| getName | back to summary |
|---|---|
| public String getName() | |
| setName | back to summary |
|---|---|
| public void setName(String s) | |