Save This Page
Home » apache-ant-1.7.1-src » org.apache.tools » ant » taskdefs » [javadoc | source]
org.apache.tools.ant.taskdefs
abstract public class: AbstractCvsTask [javadoc | source]
java.lang.Object
   org.apache.tools.ant.ProjectComponent
      org.apache.tools.ant.Task
         org.apache.tools.ant.taskdefs.AbstractCvsTask

All Implemented Interfaces:
    Cloneable

Direct Known Subclasses:
    CvsTagDiff, CvsVersion, Cvs, ChangeLogTask

original Cvs.java 1.20 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.
Field Summary
public static final  int DEFAULT_COMPRESSION_LEVEL    Default compression level to use, if compression is enabled via setCompression( true ). 
Fields inherited from org.apache.tools.ant.Task:
target,  taskName,  taskType,  wrapper
Fields inherited from org.apache.tools.ant.ProjectComponent:
project,  location,  description
Constructor:
 public AbstractCvsTask() 
Method from org.apache.tools.ant.taskdefs.AbstractCvsTask Summary:
addCommandArgument,   addCommandArgument,   addConfiguredCommandline,   addConfiguredCommandline,   configureCommandline,   execute,   getCommand,   getCvsRoot,   getCvsRsh,   getDest,   getErrorStream,   getExecuteStreamHandler,   getOutputStream,   getPackage,   getPassFile,   getPort,   getTag,   removeCommandline,   runCommand,   setAppend,   setCommand,   setCompression,   setCompressionLevel,   setCvsRoot,   setCvsRsh,   setDate,   setDest,   setError,   setErrorStream,   setExecuteStreamHandler,   setFailOnError,   setNoexec,   setOutput,   setOutputStream,   setPackage,   setPassfile,   setPort,   setQuiet,   setReallyquiet,   setTag
Methods from org.apache.tools.ant.Task:
bindToOwner,   execute,   getOwningTarget,   getRuntimeConfigurableWrapper,   getTaskName,   getTaskType,   getWrapper,   handleErrorFlush,   handleErrorOutput,   handleFlush,   handleInput,   handleOutput,   init,   isInvalid,   log,   log,   log,   log,   markInvalid,   maybeConfigure,   perform,   reconfigure,   setOwningTarget,   setRuntimeConfigurableWrapper,   setTaskName,   setTaskType
Methods from org.apache.tools.ant.ProjectComponent:
clone,   getDescription,   getLocation,   getProject,   log,   log,   setDescription,   setLocation,   setProject
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tools.ant.taskdefs.AbstractCvsTask Detail:
 public  void addCommandArgument(String arg) 
    This needs to be public to allow configuration of commands externally.
 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
 public  void addConfiguredCommandline(Commandline c) 
    Adds direct command-line to execute.
 public  void addConfiguredCommandline(Commandline c,
    boolean insertAtStart) 
    Configures and adds the given Commandline.
 protected  void configureCommandline(Commandline c) 
    Configure a commandline element for things like cvsRoot, quiet, etc.
 public  void execute() throws BuildException 
    do the work
 public String getCommand() 
    accessor to a command line as string This should be deprecated AntoineLL July 23d 2003
 public String getCvsRoot() 
    access the CVSROOT variable
 public String getCvsRsh() 
    access the CVS_RSH variable
 public 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 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
 public String getPackage() 
    access the package or module to operate upon
 public File getPassFile() 
    find the password file
 public int getPort() 
    access the port of CVS
 public 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) throws BuildException 
    Sets up the environment for toExecute and then runs it.
 public  void setAppend(boolean value) 
    Whether to append output/error when redirecting to a file.
 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
 public  void setCompression(boolean usecomp) 
    If true, this is the same as compressionlevel="3".
 public  void setCompressionLevel(int level) 
    If set to a value 1-9 it adds -zN to the cvs command line, else it disables compression.
 public  void setCvsRoot(String root) 
    The CVSROOT variable.
 public  void setCvsRsh(String rsh) 
    The CVS_RSH variable.
 public  void setDate(String p) 
    Use the most recent revision no later than the given date.
 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.

 public  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
 public  void setExecuteStreamHandler(ExecuteStreamHandler handler) 
    sets the handler
 public  void setFailOnError(boolean failOnError) 
    Stop the build process if the command exits with a return code other than 0. Defaults to false.
 public  void setNoexec(boolean ne) 
    If true, report only and don't change any files.
 public  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
 public  void setPackage(String p) 
    The package/module to operate upon.
 public  void setPassfile(File passFile) 
    Password file to read passwords from.
 public  void setPort(int port) 
    Port used by CVS to communicate with the server.
 public  void setQuiet(boolean q) 
    If true, suppress informational messages.
 public  void setReallyquiet(boolean q) 
    If true, suppress all messages.
 public  void setTag(String p) 
    The tag of the package/module to operate upon.