A base class for creating tasks for executing commands on SourceOffSite.
These tasks were inspired by the VSS tasks.
getComment
protected String getComment()
Get the comment
- if it was set, null if not.
getFilename
protected String getFilename()
Get the filename to be acted upon.
- if it was set, null if not.
getLabel
protected String getLabel()
Get the label
- if it was set, null if not.
getLocalPath
protected String getLocalPath()
Builds and returns the working directory.
The localpath is created if it didn't exist.
- the absolute path of the working directory.
getNoCache
protected String getNoCache()
Get the NoCache flag.
- the 'nocache' Flag if the attribute was 'true', otherwise an empty string.
getNoCompress
protected String getNoCompress()
Get the NoCompress flag.
- the 'nocompress' Flag if the attribute was 'true',
otherwise an empty string.
getOptionalAttributes
protected void getOptionalAttributes()
Adds the optional attributes to the command line.
getPassword
protected String getPassword()
Get the password
- empty string if it wasn't set.
getProjectPath
protected String getProjectPath()
Get the project path
- if it was set, null if not.
getRecursive
protected String getRecursive()
Get the 'recursive' Flag.
- the 'recursive' Flag if the attribute was 'true', otherwise an empty string.
getRequiredAttributes
protected void getRequiredAttributes()
Sets the executable and add the required attributes to the command line.
getSosCommand
protected String getSosCommand()
Get the executable to run. Add the path if it was specifed in the build file
getSosHome
protected String getSosHome()
Get the SOS home directory.
- if it was set, null if not.
getSosServerPath
protected String getSosServerPath()
Get the SOS serve path.
- if it was set, null if not.
getUsername
protected String getUsername()
Get the username
- if it was set, null if not.
getVerbose
protected String getVerbose()
Get the 'verbose' Flag.
- the 'verbose' Flag if the attribute was 'true', otherwise an empty string.
getVersion
protected String getVersion()
Get the version
- if it was set, null if not.
getVssServerPath
protected String getVssServerPath()
Get the VSS server path
- if it was set, null if not.
run
protected int run(Commandline cmd)
Execute the created command line.
cmd
- The command line to run.
setInternalComment
protected void setInternalComment(String text)
Set the comment text.
text
- the comment text to use.
setInternalFilename
protected void setInternalFilename(String file)
Set the file name.
file
- the filename to use.
setInternalLabel
protected void setInternalLabel(String text)
Set the label.
setInternalRecursive
protected void setInternalRecursive(boolean recurse)
Set the recursive flag.
recurse
- if true use the recursive flag on the command line.
setInternalVersion
protected void setInternalVersion(String text)
Set the version.
text
- the version to use.
setLocalPath
public final void setLocalPath(Path path)
Override the working directory and get to the specified path.
path
- The new localPath value.
setNoCache
public final void setNoCache(boolean nocache)
Flag to disable the cache when set.
Required if SOSHOME is set as an environment variable.
Defaults to false.
nocache
- True to disable caching.
setNoCompress
public final void setNoCompress(boolean nocompress)
Flag to disable compression when set. Defaults to false.
nocompress
- True to disable compression.
setPassword
public final void setPassword(String password)
The SourceSafe password.
password
- The new password value.
setProjectPath
public final void setProjectPath(String projectpath)
The SourceSafe project path.
projectpath
- The new projectpath value.
setSosCmd
public final void setSosCmd(String dir)
The directory where soscmd(.exe) is located.
soscmd must be on the path if omitted.
dir
- The new sosCmd value.
setSosHome
public final void setSosHome(String sosHome)
Path to the SourceOffSite home directory.
sosHome
- The new sosHome value.
setSosServerPath
public final void setSosServerPath(String sosServerPath)
The address and port of SourceOffSite Server,
for example 192.168.0.1:8888.
sosServerPath
- The new sosServerPath value.
setUsername
public final void setUsername(String username)
The SourceSafe username.
username
- The new username value.
setVerbose
public void setVerbose(boolean verbose)
Enable verbose output. Defaults to false.
verbose
- True for verbose output.
setVssServerPath
public final void setVssServerPath(String vssServerPath)
The path to the location of the ss.ini file.
vssServerPath
- The new vssServerPath value.