back to content

Dynamsoft SourceAnywhere Ant Plug-in

Contents

Introduction

In addition to the 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. The SourceAnywhere 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 Anywhere Standalone.

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

Parameters

Attribute

Values

Required
server Specifies the domain name or IP address of a running Dynamsoft SourceAnywhere server. Yes
port Specifies the port of a running Dynamsoft SourceAnywhere  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. Yes
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
compression true or false. The default value is true. No
filetype Specifies the file type. Valid parameters are "binary", "mergeable" and "autodetect", the default value is "autodetect".  
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
server="127.0.0.1"
port="7777"
username="test"
pwd="test123"
repository="antplugin"
project="$/anttest"
workdir="D:\projects\test"
tempdir="D:\temp"
file="1.txt" />

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
server Specifies the domain name or IP address of a running Dynamsoft SourceAnywhere server. Yes
port Specifies the port of a running Dynamsoft SourceAnywhere  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. Yes
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
compression true or false. The default value is true. 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="127.0.0.1"
port="7777"
username="test"
pwd="test123"
repository="antplugin"
project="$/anttest"
workdir="D:\projects\test"
tempdir="D:\temp"
recursive="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
server Specifies the domain name or IP address of a running Dynamsoft SouceAnywhere 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
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 local working folder. Yes
tempdir Specifies a local folder for storing temporary files. Yes
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
compression true or false. The default value is true. 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
server="127.0.0.1"
port="7777"
username="test"
pwd="test123"
repository="antplugin"
project="$/anttest"
file="1.txt"
workdir="D:\projects\test"
tempdir="D:\temp" />

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
server Specifies the domain name or IP address of a running Dynamsoft SouceAnywhere 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 local working folder. Yes
tempdir Specifies a local folder for storing temporary files. Yes
recursive Specifies whether to check in recursively, true or false. 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
compression true or false. The default value is true. 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
server="127.0.0.1"
port="7777"
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
server Specifies the domain name or IP address of a running Dynamsoft SouceAnywhere 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. Yes
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
compression true or false. The default value is true. 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="7777"
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 folder. This command also makes the local files in the  project writable. Use recursively to checkout a  project recursively.

Parameters

Attribute

Values

Required
server Specifies the domain name or IP address of a running Dynamsoft SouceAnywhere 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
tempdir Specifies a local folder for storing temporary files. Yes
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
compression true or false. The default value is true. 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
server="127.0.0.1"
port="7777"
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
server Specifies the domain name or IP address of a running Dynamsoft SouceAnywhere 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
newproject Specifies the name of the new project. Yes
compression Specifies whether to use compression, true or false. The default value is true. 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

Examples

<saw:newproject
server="127.0.0.1"
port="7777"
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
server Specifies the domain name or IP address of a running Dynamsoft SouceAnywhere 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
file Specifies the name of the file that you would like to see history. Yes
compression Specifies whether to use compression, true or false. The default value is true. 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

Examples

<saw:getfilehistory
server="127.0.0.1"
port="7777"
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
server Specifies the domain name or IP address of a running Dynamsoft SouceAnywhere 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
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
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
compression Specifies whether to use compression, true or false. The default value is true. 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

Examples

<saw:getlatestfile
server="127.0.0.1"
port="7777"
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
server Specifies the domain name or IP address of a running Dynamsoft SouceAnywhere 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
file Specifies the name of the file(s) in the repository. Yes
version/Label Specifies the version number the file or a label that can be associated with a particular file version. Yes
workdir Specifies the local working folder. Yes
tempdir Specifies a local folder for storing temporary files. Yes
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
compression Specifies whether to use compression, true or false. The default value is true. 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
server="127.0.0.1"
port="7777"
username="test"
pwd="test123"
repository="antplugin"
project="$/"
workdir="D:\projects\test"
tempdir="D:\temp"
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
server Specifies the domain name or IP address of a running Dynamsoft SouceAnywhere 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 local working folder. Yes
tempdir Specifies a local folder for storing temporary files. Yes
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
compression Specifies whether to use compression, true or false. The default value is true. 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
server="127.0.0.1"
port="7777"
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
server Specifies the domain name or IP address of a running Dynamsoft SouceAnywhere 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 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. Yes
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
compression Specifies whether to use compression, true or false. The default value is true. 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
server="127.0.0.1"
port="7777"
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
server Specifies the domain name or IP address of a running Dynamsoft SouceAnywhere 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
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
compression Specifies whether to use compression, true or false. The default value is true. 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
server="127.0.0.1"
port="7777"
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
server Specifies the domain name or IP address of a running Dynamsoft SouceAnywhere 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
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
compression Specifies whether to use compression, true or false. The default value is true. 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
server="127.0.0.1"
port="7777"
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
server Specifies the domain name or IP address of a running Dynamsoft SouceAnywhere 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
label Specifies a label that can be associated with a particular project version or file version. Yes
compression Specifies whether to use compression, true or false. The default value is true. 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
server="127.0.0.1"
port="7777"
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 Ant Plug-in

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

1. Install SourceAnywhere Server.

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

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

4. 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 Ant Plug-in Configuration Example

<project name="sawant" basedir="." default="sawgetlatestfile" xmlns:saw="antlib:com.dynamsoft.saws.ant.sawsant">
<target name="sawgetlatestfile">
<saw:getlatestfile
server="127.0.0.1"
port="7777"
username="admin"
pwd="1"
repository="anttest"
project="$/"
workdir="D:\projects\test"
tempdir="D:\temp"
file="1.txt">
</target>
</project>