AbstractCvsTask (Apache Ant API)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.ProjectComponent | +--org.apache.tools.ant.Task | +--org.apache.tools.ant.taskdefs.AbstractCvsTask
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 | |
static int |
DEFAULT_COMPRESSION_LEVEL
Default compression level to use, if compression is enabled via setCompression( true ). |
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 | |
AbstractCvsTask()
empty no-arg constructor |
Method Summary | |
void |
addCommandArgument(Commandline c,
java.lang.String arg)
|
void |
addCommandArgument(java.lang.String arg)
This needs to be public to allow configuration of commands externally. |
void |
addConfiguredCommandline(Commandline c)
Adds direct command-line to execute. |
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. |
void |
execute()
Called by the project to let the task do its work. |
java.lang.String |
getCommand()
|
java.lang.String |
getCvsRoot()
|
java.lang.String |
getCvsRsh()
|
java.io.File |
getDest()
|
protected java.io.OutputStream |
getErrorStream()
|
protected ExecuteStreamHandler |
getExecuteStreamHandler()
|
protected java.io.OutputStream |
getOutputStream()
|
java.lang.String |
getPackage()
|
java.io.File |
getPassFile()
|
int |
getPort()
|
protected void |
removeCommandline(Commandline c)
|
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(java.lang.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(java.lang.String root)
The CVSROOT variable. |
void |
setCvsRsh(java.lang.String rsh)
The CVS_RSH variable. |
void |
setDate(java.lang.String p)
Use the most recent revision no later than the given date. |
void |
setDest(java.io.File dest)
The directory where the checked out files should be placed. |
void |
setError(java.io.File error)
The file to direct standard error from the command. |
protected void |
setErrorStream(java.io.OutputStream errorStream)
|
void |
setExecuteStreamHandler(ExecuteStreamHandler 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(java.io.File output)
The file to direct standard output from the command. |
protected void |
setOutputStream(java.io.OutputStream outputStream)
|
void |
setPackage(java.lang.String p)
The package/module to operate upon. |
void |
setPassfile(java.io.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 |
setTag(java.lang.String p)
The tag of the package/module to operate upon. |
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 |
public static final int DEFAULT_COMPRESSION_LEVEL
Constructor Detail |
public AbstractCvsTask()
Method Detail |
public void setExecuteStreamHandler(ExecuteStreamHandler handler)
protected ExecuteStreamHandler getExecuteStreamHandler()
protected void setOutputStream(java.io.OutputStream outputStream)
protected java.io.OutputStream getOutputStream()
protected void setErrorStream(java.io.OutputStream errorStream)
protected java.io.OutputStream getErrorStream()
protected void runCommand(Commandline toExecute) throws BuildException
BuildException
public void execute() throws BuildException
Task
execute
in class Task
BuildException
- if something goes wrong with the buildpublic void setCvsRoot(java.lang.String root)
root
- public java.lang.String getCvsRoot()
public void setCvsRsh(java.lang.String rsh)
rsh
- public java.lang.String getCvsRsh()
public void setPort(int port)
port
- public int getPort()
public void setPassfile(java.io.File passFile)
passFile
- public java.io.File getPassFile()
public void setDest(java.io.File dest)
dest
- public java.io.File getDest()
public void setPackage(java.lang.String p)
p
- public java.lang.String getPackage()
public void setTag(java.lang.String p)
p
- public void addCommandArgument(java.lang.String arg)
public void addCommandArgument(Commandline c, java.lang.String arg)
public void setDate(java.lang.String p)
p
- public void setCommand(java.lang.String c)
c
- public java.lang.String getCommand()
public void setQuiet(boolean q)
q
- public void setNoexec(boolean ne)
ne
- public void setOutput(java.io.File output)
output
- public void setError(java.io.File error)
error
- public void setAppend(boolean value)
value
- public void setFailOnError(boolean failOnError)
failOnError
- protected void configureCommandline(Commandline c)
protected void removeCommandline(Commandline c)
public void addConfiguredCommandline(Commandline c)
c
- public void addConfiguredCommandline(Commandline c, boolean insertAtStart)
insertAtStart
- If true, c ispublic void setCompressionLevel(int level)
public void setCompression(boolean usecomp)
usecomp
- If true, turns on compression using default
level, AbstractCvsTask.DEFAULT_COMPRESSION_LEVEL.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |