online source control
back to content
sign up free version control plan

Dynamsoft SourceAnywhere Hosted Ant Plug-in

Contents

Introduction

In addition to SourceAnywhere CriuseControl.NET plug-in, SourceAnywhere provides an Ant Plug-in which allow users to integrate SourceAnywhere with Ant.

The following tasks provide an interface to SourceAnywhere Hosted. The SourceAnywhere Hosted Ant Plug-in consists of a simple framework to integrate with Ant to do automatic building.

The Tasks

Task Descriptions

All examples in this section are based on the following assumptions:

addfile

Description

Task to perform Add File command to Dynamsoft SourceAnywhere Hosted.

Adds one or multiple files to a folder. The path of the file on the local machine is specified by the workdir parameter.

Parameters

Attribute

Values

Required
id Specifies the organization ID of your hosted account to Login Dynamsoft SourceAnywhere Hosted Server. Yes
username Specifies the user name used to log into Dynamsoft SourceAnywhere. Yes
pwd Specifies the password for the corresponding user to log into Dynamsoft SourceAnywhere. Yes
repository Specifies the repository you want to log into. Yes
project Specifies a valid project in the current Dynamsoft SourceAnywhere repository. Yes
file

 

Specifies the name of the file(s) or the absolute path and full name of the local file(s). Yes
workdir Specifies the local working folder. Yes
tempdir Specifies a local folder for storing temporary files. The default temporary directory is specified in the ServerInfo>General Settings section of Dynamsoft SourceAnywhere Service Configurator. Yes
usecacheserver Specifies whether to use Cache Server, true or false. The default value is false. No
cacheserver Specifies the IP or domain name of your cache server. No
cacheserverport Specifies the port of your cache server. No
comment Comments on the corresponding operations with text. The default value is None. No
writable true or false. The default value is false. No
ptype Specifies the proxy type. Valid ptype parameters are "None", "Http", "Socks4" and "Socks5", the default value is "None". No
pserver Specifies the domain name or IP address of the proxy server. If ptype = "None", this parameter is invalid and not required. No
pport Specifies the port of the proxy server. No
puser Specifies the user name used to connect to the proxy server. If ptype = "None", this parameter is invalid and not required. No
ppwd Specifies the password for the corresponding user to connect to the proxy server. No
ssl Specifies whether to connect to server using SSL encryption, true or false. The default value is false. No
filetype Specifies the file type. Valid parameters are "binary", "mergeable" and "autodetect", the default value is "autodetect". No
comparefile Specifies how SourceAnywhere determines if your local copy is up-to-date. Valid parameters are "time" and "checksum", the default value is "checksum". No

Examples

<saw:addfile
id="100086"
username="test"
pwd="test123"
repository="antplugin"
project="$/anttest"
workdir="D:\projects\test "
tempdir="D:\temp "
file="1.txt"
ssl="true" />

Add the file named 1.txt into the root directory of the repository anttest.

addproject

Description

Task to perform Add Project command to Dynamsoft SourceAnywhere.

Adds an entire local folder to Dynamsoft SourceAnywhere. The path of the folder on the local machine is specified by the workdir parameter. Use recursive to add the folder recursively.

Parameters

Attribute

Values

Required
id Specifies the organization ID of your hosted account to Login Dynamsoft SourceAnywhere Hosted Server. Yes
username Specifies the user name used to log into Dynamsoft SourceAnywhere. Yes
pwd Specifies the password for the corresponding user to log into Dynamsoft SourceAnywhere. Yes
repository Specifies the repository you want to log into. Yes
project Specifies a valid project in the current Dynamsoft SourceAnywhere repository. Yes
workdir Specifies the local working folder. Yes
tempdir Specifies a local folder for storing temporary files.. The default temporary directory is specified in the ServerInfo>General Settings section of Dynamsoft SourceAnywhere Service Configurator. Yes
usecacheserver Specifies whether to use Cache Server, true or false. The default value is false. No
cacheserver Specifies the IP or domain name of your cache server. No
cacheserverport Specifies the port of your cache server. No
recursive Specifies whether to add recursively, true or false. No
comment Comments on the corresponding operations with text. The default value is None. No
writable true or false. The default value is false. No
ptype Specifies the proxy type. Valid ptype parameters are "None", "Http", "Socks4" and "Socks5", the default value is "None". No
pserver Specifies the domain name or IP address of the proxy server. If ptype = "None", this parameter is invalid and not required. No
pport Specifies the port of the proxy server. No
puser Specifies the user name used to connect to the proxy server. If ptype = "None", this parameter is invalid and not required. No
ppwd Specifies the password for the corresponding user to connect to the proxy server. No
ssl Specifies whether to connect to server using SSL encryption, true or false. The default value is false. No
filetype Specifies the file type. Valid parameters are "binary", "mergeable" and "autodetect", the default value is "autodetect". No
comparefile Specifies how SourceAnywhere determines if your local copy is up-to-date. Valid parameters are "time" and "checksum", the default value is "checksum". No

Examples

<saw:addproject
server="100086"
username="test"
pwd="test123"
repository="antplugin"
project="$/anttest"
workdir="D:\projects\test "
tempdir="D:\temp "
recursive="true"
ssl="true" />

Add the folder named workpath into the root directory of the repository anttest recursively.

checkinfile

Description

Task to perform Check In File command to Dynamsoft SourceAnywhere.

Checks in and unlocks one or multiple files. This command also makes the local files readonly.

Parameters

Attribute

Values

Required
id Specifies the organization ID of your hosted account to Login Dynamsoft SourceAnywhere Hosted Server. Yes
username Specifies the user name used to log into Dynamsoft SouceAnywhere. Yes
pwd Specifies the password for the corresponding user to log into Dynamsoft SourceAnywhere. Yes
repository Specifies the repository you want to log into. Yes
project Specifies a valid project in the current Dynamsoft SourceAnywhere repository. Yes
file Specifies the name of the file(s) in the repository or the absolute path and full name of the local file(s). Yes
workdir Specifies the working folder to place files. Yes
tempdir Specifies a local folder for storing temporary files.. The default temporary directory is specified in the ServerInfo>General Settings section of Dynamsoft SourceAnywhere Service Configurator. Yes
usecacheserver Specifies whether to use Cache Server, true or false. The default value is false. No
cacheserver Specifies the IP or domain name of your cache server. No
cacheserverport Specifies the port of your cache server. No
keep Keeps checkout status after the checkin operation. Valid value are true or false. No
comment Comments on the corresponding operations with text. The default value is None. No
checkinunchanged Specifies the behavior when trying to check in unchanged file(s). There are two options: checkin or undo. No
writable true or false. The default value is false. No
ptype Specifies the proxy type. Valid ptype parameters are "None", "Http", "Socks4" and "Socks5", the default value is "None". No
pserver Specifies the domain name or IP address of the proxy server. If ptype = "None", this parameter is invalid and not required. No
pport Specifies the port of the proxy server. No
puser Specifies the user name used to connect to the proxy server. If ptype = "None", this parameter is invalid and not required. No
ppwd Specifies the password for the corresponding user to connect to the proxy server. No
ssl Specifies whether to connect to server using SSL encryption. true or false. The default value is false. No
comparefile Specifies how SourceAnywhere determines if your local copy is up-to-date. Valid parameters are "time" and "checksum", the default value is "checksum". No

Examples

<saw:checkinfile
id="100086"
username="test"
pwd="test123"
repository="antplugin"
project="$/anttest"
file="1.txt"
workdir="D:\projects\test "
tempdir="D:\temp "
ssl="true" />

Check in the file named 1.txt into the root directory of the team project anttest.

checkinproject

Description

Task to perform Check In Project command to Dynamsoft SourceAnywhere.

Checks in and unlocks an entire folder. This command also makes the local files in the folder readonly. Use recursively to check in the project recursively.

Parameters

Attribute

Values

Required
id Specifies the organization ID of your hosted account to Login Dynamsoft SourceAnywhere Hosted Server. Yes
username Specifies the user name used to log into Dynamsoft SouceAnywhere. Yes
pwd Specifies the password for the corresponding user to log into Dynamsoft SourceAnywhere. Yes
repository Specifies the repository you want to log into. Yes
project Specifies a valid project in the current Dynamsoft SourceAnywhere repository. Yes
workdir Specifies the working folder to place files. Yes
tempdir Specifies a local folder for storing temporary files.. The default temporary directory is specified in the ServerInfo>General Settings section of Dynamsoft SourceAnywhere Service Configurator. Yes
recursive Specifies whether to check in recursively, true or false. No
usecacheserver Specifies whether to use Cache Server, true or false. The default value is false. No
cacheserver Specifies the IP or domain name of your cache server. No
cacheserverport Specifies the port of your cache server. No
keep Keeps checkout status after the checkin operation. Valid value are true or false. No
comment Comments on the corresponding operations with text. The default value is None. No
checkinunchanged Specifies the behavior when trying to check in unchanged file(s). There are two options: checkin or undo. No
writable true or false. The default value is false. No
ptype Specifies the proxy type. Valid ptype parameters are "None", "Http", "Socks4" and "Socks5", the default value is "None". No
pserver Specifies the domain name or IP address of the proxy server. If ptype = "None", this parameter is invalid and not required. No
pport Specifies the port of the proxy server. No
puser Specifies the user name used to connect to the proxy server. If ptype = "None", this parameter is invalid and not required. No
ppwd Specifies the password for the corresponding user to connect to the proxy server. No
ssl Specifies whether to connect to server using SSL encryption. true or false. The default value is false. No
comparefile Specifies how SourceAnywhere determines if your local copy is up-to-date. Valid parameters are "time" and "checksum", the default value is "checksum". No

Examples

<saw:checkinproject
id="100086"
username="test"
pwd="test123"
repository="antplugin"
project="$/anttest"
workdir="D:\projects\test "
tempdir="D:\temp "/>

Check in the project named anttest in the root directory of the repository antplugin.

checkoutfile

Description

Task to perform Check Out File command to Dynamsoft SourceAnywhere.

Checks out and locks one or multiple files in the same folder. This command also makes the local files writable.

Parameters

Attribute

Values

Required
id Specifies the organization ID of your hosted account to Login Dynamsoft SourceAnywhere Hosted Server. Yes
port Specifies the port of a running Dynamsoft SouceAnywhere server. Yes
username Specifies the user name used to log into Dynamsoft SouceAnywhere. Yes
pwd Specifies the password for the corresponding user to log into Dynamsoft SourceAnywhere. Yes
repository Specifies the repository you want to log into. Yes
project Specifies a valid project in the current Dynamsoft SourceAnywhere repository. Yes
workdir Specifies the working folder to place files. Yes
file Specifies the name of the file(s) in the repository. Yes
tempdir Specifies a local folder for storing temporary files.. The default temporary directory is specified in the ServerInfo>General Settings section of Dynamsoft SourceAnywhere Service Configurator. Yes
usecacheserver Specifies whether to use Cache Server, true or false. The default value is false. No
cacheserver Specifies the IP or domain name of your cache server. No
cacheserverport Specifies the port of your cache server. No
replacewritable Specifies whether to replace writable local copies. Valid value are skip or replace. No
eol Specifies the EOL type. Valid values are windows, unix or mac. No
time Sets the modification time of the local file or project. Valid time parameters are "current" (default), "modi" and "checkin".
 
No
comment Comments on the corresponding operations with text. The default value is None. No
ptype Specifies the proxy type. Valid ptype parameters are "None", "Http", "Socks4" and "Socks5", the default value is "None". No
pserver Specifies the domain name or IP address of the proxy server. If ptype = "None", this parameter is invalid and not required. No
pport Specifies the port of the proxy server. No
puser Specifies the user name used to connect to the proxy server. If ptype = "None", this parameter is invalid and not required. No
ppwd Specifies the password for the corresponding user to connect to the proxy server. No
ssl Specifies whether to connect to server using SSL encryption. true or false. The default value is false. No
comparefile Specifies how SourceAnywhere determines if your local copy is up-to-date. Valid parameters are "time" and "checksum", the default value is "checksum". No

Examples

<saw:checkoutfile
server="127.0.0.1"
port="7771"
username="test"
pwd="test123"
repository="antplugin"
project="$/anttest"
file="1.txt"
workdir="D:\projects\test "
tempdir="D:\temp " />

Check out the file named 1.txt in the $/anttest project in repository anttest.

checkoutproject

Description

Task to perform Check Out Project command to Dynamsoft SourceAnywhere.

Checks out and locks an entire project. This command also makes the local files in the folder writable. Use recursively to checkout a project recursively.

Parameters

Attribute

Values

Required
id Specifies the organization ID of your hosted account to Login Dynamsoft SourceAnywhere Hosted Server. Yes
username Specifies the user name used to log into Dynamsoft SouceAnywhere. Yes
pwd Specifies the password for the corresponding user to log into Dynamsoft SourceAnywhere. Yes
repository Specifies the repository you want to log into. Yes
project Specifies a valid project in the current Dynamsoft SourceAnywhere repository. Yes
workdir Specifies the working folder to place files. Yes
tempdir Specifies a local folder for storing temporary files.. The default temporary directory is specified in the ServerInfo>General Settings section of Dynamsoft SourceAnywhere Service Configurator. Yes
usecacheserver Specifies whether to use Cache Server, true or false. The default value is false. No
cacheserver Specifies the IP or domain name of your cache server. No
cacheserverport Specifies the port of your cache server. No
recursive Specifies whether to check out recursively, true or false. No
replacewritable Specifies whether to replace writable local copies. Valid value are skip or replace. No
eol Specifies the EOL type. Valid values are windows, unix or mac. No
time Sets the modification time of the local file or project. Valid time parameters are "current" (default), "modi" and "checkin".
 
No
comment Comments on the corresponding operations with text. The default value is None. No
ptype Specifies the proxy type. Valid ptype parameters are "None", "Http", "Socks4" and "Socks5", the default value is "None". No
pserver Specifies the domain name or IP address of the proxy server. If ptype = "None", this parameter is invalid and not required. No
pport Specifies the port of the proxy server. No
puser Specifies the user name used to connect to the proxy server. If ptype = "None", this parameter is invalid and not required. No
ppwd Specifies the password for the corresponding user to connect to the proxy server. No
ssl Specifies whether to connect to server using SSL encryption. true or false. The default value is false. No
comparefile Specifies how SourceAnywhere determines if your local copy is up-to-date. Valid parameters are "time" and "checksum", the default value is "checksum". No

Examples

<saw:checkoutproject
id="100086"
username="test"
pwd="test123"
repository="antplugin"
project="$/anttest"
workdir="D:\projects\test "
tempdir="D:\temp " />

Check out the project named anttest in the repository antplugin.

newproject

Description

Task to perform New Project command to Dynamsoft SourceAnywhere.

Creates an empty project in the current repository. Use project to specify the project path and name.

Parameters

Attribute

Values

Required
id Specifies the organization ID of your hosted account to Login Dynamsoft SourceAnywhere Hosted Server. Yes
username Specifies the user name used to log into Dynamsoft SouceAnywhere. Yes
pwd Specifies the password for the corresponding user to log into Dynamsoft SourceAnywhere. Yes
repository Specifies the repository you want to log into. Yes
project Specifies a valid project in the current Dynamsoft SourceAnywhere repository. Yes
newproject Specifies the name of the new project. Yes
usecacheserver Specifies whether to use Cache Server, true or false. The default value is false. No
cacheserver Specifies the IP or domain name of your cache server. No
cacheserverport Specifies the port of your cache server. No
comment Comments on the corresponding operations with text. The default value is None. No
ptype Specifies the proxy type. Valid ptype parameters are "None", "Http", "Socks4" and "Socks5", the default value is "None". No
pserver Specifies the domain name or IP address of the proxy server. If ptype = "None", this parameter is invalid and not required. No
pport Specifies the port of the proxy server. No
puser Specifies the user name used to connect to the proxy server. If ptype = "None", this parameter is invalid and not required. No
ppwd Specifies the password for the corresponding user to connect to the proxy server. No
ssl Specifies whether to connect to server using SSL encryption, true or false. The default value is false. No

Examples

<saw:newproject
id="100086"
username="test"
pwd="test123"
repository="antplugin"
project="$/"
newproject="anttest"/>

Add the project named anttest under the root directory of the repository antplugin.

getfilehistory

Description

Task to perform Get File History command to Dynamsoft SourceAnywhere.

Displays the revision history of the file.

Parameters

Attribute

Values

Required
id Specifies the organization ID of your hosted account to Login Dynamsoft SourceAnywhere Hosted Server. Yes
username Specifies the user name used to log into Dynamsoft SouceAnywhere. Yes
pwd Specifies the password for the corresponding user to log into Dynamsoft SourceAnywhere. Yes
repository Specifies the repository you want to log into. Yes
project Specifies a valid project in the current Dynamsoft SourceAnywhere repository. Yes
file Specifies the name of the file that you would like to see history. Yes
usecacheserver Specifies whether to use Cache Server, true or false. The default value is false. No
cacheserver Specifies the IP or domain name of your cache server. No
cacheserverport Specifies the port of your cache server. No
user Specifies an existing username. No
ptype Specifies the proxy type. Valid ptype parameters are "None", "Http", "Socks4" and "Socks5", the default value is "None". No
pserver Specifies the domain name or IP address of the proxy server. If ptype = "None", this parameter is invalid and not required. No
pport Specifies the port of the proxy server. No
puser Specifies the user name used to connect to the proxy server. If ptype = "None", this parameter is invalid and not required. No
ppwd Specifies the password for the corresponding user to connect to the proxy server. No
ssl Specifies whether to connect to server using SSL encryption, true or false. The default value is false. No

Examples

<saw:getfilehistory
id="100086"
username="test"
pwd="test123"
repository="antplugin"
project="$/anttest"
file="1.txt" />

View the history of the file named 1.txt in the $/anttest project of the repository antplugin.

getlatestfile

Description

Task to perform Get Latest File command to Dynamsoft SourceAnywhere.

Retrieves the most recent files from the current repository.

Parameters

Attribute

Values

Required
id Specifies the organization ID of your hosted account to Login Dynamsoft SourceAnywhere Hosted Server. Yes
username Specifies the user name used to log into Dynamsoft SouceAnywhere. Yes
pwd Specifies the password for the corresponding user to log into Dynamsoft SourceAnywhere. Yes
repository Specifies the repository you want to log into. Yes
project Specifies a valid project in the current Dynamsoft SourceAnywhere repository. Yes
file Specifies the name of the file(s) in the repository. Yes
workdir Specifies the local working folder. Yes
tempdir Specifies a local folder for storing temporary files.. The default temporary directory is specified in the ServerInfo>General Settings section of Dynamsoft SourceAnywhere Service Configurator. Yes
usecacheserver Specifies whether to use Cache Server, true or false. The default value is false. No
cacheserver Specifies the IP or domain name of your cache server. No
cacheserverport Specifies the port of your cache server. No
writable Makes the local files writable. No
replacewritable Specifies whether to replace writable local copies. Valid values are skip or replace. No
eol Specifies the EOL type. Valid values are windows, unix or mac. No
time Sets the modification time of the local file or project. Valid time parameters are "current" (default), "modi" and "checkin". No
ssl Specifies whether to connect to server using SSL encryption, true or false. The default value is false. No
user Specifies an existing username. No
ptype Specifies the proxy type. Valid ptype parameters are "None", "Http", "Socks4" and "Socks5", the default value is "None". No
pserver Specifies the domain name or IP address of the proxy server. If ptype = "None", this parameter is invalid and not required. No
pport Specifies the port of the proxy server. No
puser Specifies the user name used to connect to the proxy server. If ptype = "None", this parameter is invalid and not required. No
ppwd Specifies the password for the corresponding user to connect to the proxy server. No
comparefile Specifies how SourceAnywhere determines if the local copy is up-to-date. Valid values are time and checksum. No
ssl Specifies whether to connect to server using SSL encryption, true or false. The default value is false. No

Examples

<saw:getlatestfile
id="100086"
username="test"
pwd="test123"
repository="antplugin"
project="$/anttest"
workdir="D:\projects\test"
tempdir="D:\temp"
file="1.txt"
eol="unix" />

Get the latest file named 1.txt under $/anttest in the repository antplugin.

getoldversionfile

Description

Task to perform Get Old Version File command to Dynamsoft SourceAnywhere.

Retrieves the old file version from the current team project. The version parameter is used to specify an old file version.

Parameters

Attribute

Values

Required
id Specifies the organization ID of your hosted account to Login Dynamsoft SourceAnywhere Hosted Server. Yes
username Specifies the user name used to log into Dynamsoft SouceAnywhere. Yes
pwd Specifies the password for the corresponding user to log into Dynamsoft SourceAnywhere. Yes
repository Specifies the repository you want to log into. Yes
project Specifies a valid project in the current Dynamsoft SourceAnywhere repository. Yes
file Specifies the name of the file(s) in the repository. Yes
workdir Specifies the local working folder. Yes
tempdir Specifies a local folder for storing temporary files. The default temporary directory is specified in the ServerInfo>General Settings section of Dynamsoft SourceAnywhere Service Configurator. Yes
version/label Specifies the version number the project or a label that can be associated with a particular project version. Yes
usecacheserver Specifies whether to use Cache Server, true or false. The default value is false. No
cacheserver Specifies the IP or domain name of your cache server. No
cacheserverport Specifies the port of your cache server. No
writable Makes the local files writable. No
replacewritable Specifies whether to replace writable local copies. Valid values are skip or replace. No
eol Specifies the EOL type. Valid values are windows, unix or mac. No
time Sets the modification time of the local file or project. Valid time parameters are "current" (default), "modi" and "checkin".
 
No
ssl Specifies whether to connect to server using SSL encryption, true or false. The default value is false. No
ptype Specifies the proxy type. Valid ptype parameters are "None", "Http", "Socks4" and "Socks5", the default value is "None". No
pserver Specifies the domain name or IP address of the proxy server. If ptype = "None", this parameter is invalid and not required. No
pport Specifies the port of the proxy server. No
puser Specifies the user name used to connect to the proxy server. If ptype = "None", this parameter is invalid and not required. No
ppwd Specifies the password for the corresponding user to connect to the proxy server. No
comparefile Specifies how SourceAnywhere determines if the local copy is up-to-date. Valid values are time and checksum. No

Examples

<saw:getoldversionfile
id="100086"
username="test"
pwd="test123"
repository="antplugin"
project="$/"
workdir="D:\Personal Folder\Cooler\workdir"
tempdir="D:\Personal Folder\Cooler\tempdir"
file="1.txt"
version="31" />

Get the 31th version of the file named 1.txt under $/anttest in the repository antplugin.

getlatestproject

Description

Task to perform Get Latest Porject command to Dynamsoft SourceAnywhere.

Gets the latest version of all files in the specified project from the current team project. Use recursive to get the project recursively.

Parameters

Attribute

Values

Required
id Specifies the organization ID of your hosted account to Login Dynamsoft SourceAnywhere Hosted Server. Yes
username Specifies the user name used to log into Dynamsoft SouceAnywhere. Yes
pwd Specifies the password for the corresponding user to log into Dynamsoft SourceAnywhere. Yes
repository Specifies the repository you want to log into. Yes
project Specifies a valid project in the current Dynamsoft SourceAnywhere repository. Yes
workdir Specifies the local working folder. Yes
tempdir Specifies a local folder for storing temporary files.. The default temporary directory is specified in the ServerInfo>General Settings section of Dynamsoft SourceAnywhere Service Configurator. Yes
usecacheserver Specifies whether to use Cache Server, true or false. The default value is false. No
cacheserver Specifies the IP or domain name of your cache server. No
cacheserverport Specifies the port of your cache server. No
recursive Specifies whether to get recursively, true or false. No
writable Makes the local files writable. No
replacewritable Specifies whether to replace writable local copies. Valid values are skip or replace. No
eol Specifies the EOL type. Valid values are windows, unix or mac. No
time Sets the modification time of the local file or project. Valid time parameters are "current" (default), "modi" and "checkin". No
ssl Specifies whether to connect to server using SSL encryption, true or false. The default value is false. No
ptype Specifies the proxy type. Valid ptype parameters are "None", "Http", "Socks4" and "Socks5", the default value is "None". No
pserver Specifies the domain name or IP address of the proxy server. If ptype = "None", this parameter is invalid and not required. No
pport Specifies the port of the proxy server. No
puser Specifies the user name used to connect to the proxy server. If ptype = "None", this parameter is invalid and not required. No
ppwd Specifies the password for the corresponding user to connect to the proxy server. No
comparefile Specifies how SourceAnywhere determines if the local copy is up-to-date. Valid values are time and checksum. No

Examples

<saw:getlatestproject
id="100086"
username="test"
pwd="test123"
repository="antplugin"
project="$/anttest"
workdir="D:\projects\test"
tempdir="D:\temp" />

Get the project named anttest in the repository antplugin.

getoldversionproject

Description

Task to perform Get Old Version Project command to Dynamsoft SourceAnywhere.

Gets the old version of all files in the specified project from the current repository. Use recursive to get the project recursively.

Parameters

Attribute

Values

Required
id Specifies the organization ID of your hosted account to Login Dynamsoft SourceAnywhere Hosted Server. Yes
username Specifies the user name used to log into Dynamsoft SouceAnywhere. Yes
pwd Specifies the password for the corresponding user to log into Dynamsoft SourceAnywhere. Yes
repository Specifies the repository you want to log into. Yes
project Specifies a valid project in the current Dynamsoft SourceAnywhere repository. Yes
workdir Specifies the local working folder. Yes
version/label Specifies the version number the project or a label that can be associated with a particular project version. Yes
tempdir Specifies a local folder for storing temporary files.. The default temporary directory is specified in the ServerInfo>General Settings section of Dynamsoft SourceAnywhere Service Configurator. Yes
usecacheserver Specifies whether to use Cache Server, true or false. The default value is false. No
cacheserver Specifies the IP or domain name of your cache server. No
cacheserverport Specifies the port of your cache server. No
recursive Specifies whether to get recursively, true or false. No
writable Makes the local files writable. No
replacewritable Specifies whether to replace writable local copies. Valid values are skip or replace. No
eol Specifies the EOL type. Valid values are windows, unix or mac. No
time Sets the modification time of the local file or project. Valid time parameters are "current" (default), "modi" and "checkin".
 
No
ssl Specifies whether to connect to server using SSL encryption, true or false. The default value is false. No
ptype Specifies the proxy type. Valid ptype parameters are "None", "Http", "Socks4" and "Socks5", the default value is "None". No
pserver Specifies the domain name or IP address of the proxy server. If ptype = "None", this parameter is invalid and not required. No
pport Specifies the port of the proxy server. No
puser Specifies the user name used to connect to the proxy server. If ptype = "None", this parameter is invalid and not required. No
ppwd Specifies the password for the corresponding user to connect to the proxy server. No
comparefile Specifies how SourceAnywhere determines if the local copy is up-to-date. Valid values are time and checksum. No

 

Examples

<saw:getoldversionproject
id="100086"
username="test"
pwd="test123"
repository="antplugin"
project="$/dd"
workdir="D:\projects\test"
tempdir="D:\temp"
label="1" />

Get the history of the project named anttest in the repository antplugin by label.

getprojecthistory

Description

Task to perform Get Project History command to Dynamsoft SourceAnywhere.

Displays the revision history of the project. If the v flag is set, the histories will be shown by version, or it will be shown by item.

Parameters

Attribute

Values

Required
id Specifies the organization ID of your hosted account to Login Dynamsoft SourceAnywhere Hosted Server. Yes
username Specifies the user name used to log into Dynamsoft SouceAnywhere. Yes
pwd Specifies the password for the corresponding user to log into Dynamsoft SourceAnywhere. Yes
repository Specifies the repository you want to log into. Yes
project Specifies a valid project in the current Dynamsoft SourceAnywhere repository. Yes
usecacheserver Specifies whether to use Cache Server, true or false. The default value is false. No
cacheserver Specifies the IP or domain name of your cache server. No
cacheserverport Specifies the port of your cache server. No
user Specifies an existing username. No
recursive Specifies whether to get recursively, true or false. No
datetime Specifies a period of time. By default it's from the current time to one year ago. You can type two value in the format "datefrom|dateto", or just one value as the ending date/time of period which begins from the current time . Acceptable date/time formats: "Jun/16/2005", "Jun/16/2005 6:10:00", "6/16/2005", "6/16/2005 6:10:00".
 
No
v Shows the project histories by version. true or false. No
ssl Specifies whether to connect to server using SSL encryption, true or false. The default value is false. No
ptype Specifies the proxy type. Valid ptype parameters are "None", "Http", "Socks4" and "Socks5", the default value is "None". No
pserver Specifies the domain name or IP address of the proxy server. If ptype = "None", this parameter is invalid and not required. No
pport Specifies the port of the proxy server. No
puser Specifies the user name used to connect to the proxy server. If ptype = "None", this parameter is invalid and not required. No
ppwd Specifies the password for the corresponding user to connect to the proxy server. No

Examples

<saw:getprojecthistory
id="100086"
username="test"
pwd="test123"
repository="antplugin"
project="$/anttest"
v="true"
/>

View the history of the project named anttest in the repository antplugin.

labelfile

Description

Task to perform Label File command to Dynamsoft SourceAnywhere.

Adds a label to a file.

Parameters

Attribute Values Required
id Specifies the organization ID of your hosted account to Login Dynamsoft SourceAnywhere Hosted Server. Yes
username Specifies the user name used to log into Dynamsoft SouceAnywhere. Yes
pwd Specifies the password for the corresponding user to log into Dynamsoft SourceAnywhere. Yes
repository Specifies the repository you want to log into. Yes
project Specifies a valid project in the current Dynamsoft SourceAnywhere repository. Yes
label Specifies a label that can be associated with a particular project version or file version. Yes
file Specifies the name of the file(s) in the repository. Yes
tempdir Specifies a local folder for storing temporary files.. The default temporary directory is specified in the ServerInfo>General Settings section of Dynamsoft SourceAnywhere Service Configurator. Yes
usecacheserver Specifies whether to use Cache Server, true or false. The default value is false. No
cacheserver Specifies the IP or domain name of your cache server. No
cacheserverport Specifies the port of your cache server. No
ssl Specifies whether to connect to server using SSL encryption, true or false. The default value is false. No
comment Comments on the label. No
ptype Specifies the proxy type. Valid ptype parameters are "None", "Http", "Socks4" and "Socks5", the default value is "None". No
pserver Specifies the domain name or IP address of the proxy server. If ptype = "None", this parameter is invalid and not required. No
pport Specifies the port of the proxy server. No
puser Specifies the user name used to connect to the proxy server. If ptype = "None", this parameter is invalid and not required. No
ppwd Specifies the password for the corresponding user to connect to the proxy server. No

Examples

<saw:labelfile
id="100086"
username="test"
pwd="test123"
repository="antplugin"
project="$/anttest"
file="1.txt"
label="release" />

Label the file named 1.txt in project anttest of the repository antplugin with release.

labelproject

Description

Task to perform Label Project command to Dynamsoft SourceAnywhere.

Adds a label to a project.

Parameters

Attribute

Values

Required
id Specifies the organization ID of your hosted account to Login Dynamsoft SourceAnywhere Hosted Server. Yes
username Specifies the user name used to log into Dynamsoft SouceAnywhere. Yes
pwd Specifies the password for the corresponding user to log into Dynamsoft SourceAnywhere. Yes
repository Specifies the repository you want to log into. Yes
project Specifies a valid project in the current Dynamsoft SourceAnywhere repository. Yes
label Specifies a label that can be associated with a particular project version or file version. Yes
tempdir Specifies a local folder for storing temporary files.. The default temporary directory is specified in the ServerInfo>General Settings section of Dynamsoft SourceAnywhere Service Configurator. Yes
usecacheserver Specifies whether to use Cache Server, true or false. The default value is false. No
cacheserver Specifies the IP or domain name of your cache server. No
cacheserverport Specifies the port of your cache server. No
ssl Specifies whether to connect to server using SSL encryption, true or false. The default value is false. No
comment Comments on the label. No
ptype Specifies the proxy type. Valid ptype parameters are "None", "Http", "Socks4" and "Socks5", the default value is "None". No
pserver Specifies the domain name or IP address of the proxy server. If ptype = "None", this parameter is invalid and not required. No
pport Specifies the port of the proxy server. No
puser Specifies the user name used to connect to the proxy server. If ptype = "None", this parameter is invalid and not required. No
ppwd Specifies the password for the corresponding user to connect to the proxy server. No

Examples

<saw:labelproject
id="100086"
username="test"
pwd="test123"
repository="antplugin"
project="$/anttest"
label="release" />

Label the project named anttest with release label in the repository antplugin.

Install Dynamsoft SourceAnywhere Hosted Ant Plug-in

To install Dynamsoft SourceAnywhere Hosted  Ant Plug-in, please follow the steps below:

1. Download SourceAnywhere Hosted Ant Plug-in and unzip it into the Lib folder under the Ant directory.

2. Edit the build.xml file in the Bin folder under the Ant directory appropriately. If there is no such file, create it.

3. Click Start->Run to open command line window. And go to the Bin folder of Ant and perform "ant" command. Then Ant will run.

SourceAnywhere Hoste Ant Plug-in Configuration Example

<project name="sawant" basedir="." default="sawgetlatestfile" xmlns:saw="antlib:com.dynamsoft.sawh.ant.sawhant">
<target name="sawgetlatestfile">
<saw:getlatestfile
id="100031"
username="admin"
pwd="1"
repository="anttest"
project="$/"
workdir="D:\projects\test "
file="1.txt"
ssl="true" />
</target>
</project>

width="112" align="center">No cacheserverport Specifies the port of your cache server. No recursive Specifies whether to check out recursively, true or false. No replacewritable Specifies whether to replace writable local copies. Valid value are skip or replace. No eol Specifies the EOL type. Valid values are windows, unix or mac. No time Sets the modification time of the local file or project. Valid time parameters are "current" (default), "modi" and "checkin".
  No comment Comments on the corresponding operations with text. The default value is None. No ptype Specifies the proxy type. Valid ptype parameters are "None", "Http", "Socks4" and "Socks5", the default value is "None". No pserver Specifies the domain name or IP address of the proxy server. If ptype = "None", this parameter is invalid and not required. No pport Specifies the port of the proxy server. No puser Specifies the user name used to connect to the proxy server. If ptype = "None", this parameter is invalid and not required. No ppwd Specifies the password for the corresponding user to connect to the proxy