StarTeam Support

These tasks make use of functions from the StarTeam API. As a result they are only available to licensed users of StarTeam. You must have starteam-sdk.jar in your classpath to run these tasks. For more information about the StarTeam API and how to license it, see the StarBase web site.


STCheckout

Description

Checks out files from a StarTeam project.

The includes and excludes attributes function differently from other tasks in Ant. Inclusion/exclusion by folder is NOT supported.

Parameters

username The username of the account used to log in to the StarTeam server. yes
password The password of the account used to log in to the StarTeam server. yes
URL A string of the form servername:portnum/project/view which enables user to set all of these elements in one string. yes*
servername The name of the StarTeam server. yes*
serverport The port number of the StarTeam server. yes*
projectname The name of the StarTeam project. yes*
viewname The name of the view in the StarTeam project. yes*
rootstarteamfolder The root of the subtree in the StarTeam repository from which to check out files. Defaults to the root folder of the view ('/'). no
rootlocalfolder The local folder which will be the root of the tree to which files are checked out. If this is not supplied, then the StarTeam "default folder" associated with rootstarteamfolder is used. Setting this may be thought of as setting a different mode of operation, since when set, it makes no sense to check StarTeam's status flags for each file, and they are not checked. When not set, we use the default folder and so we do check the status flags. no
createworkingdirs creates local folders even when the corresponding StarTeam folder is empty. Defaults to "true". no
deleteuncontrolled if true, any files NOT in StarTeam will be deleted. Defaults to "true". no
includes Only check out files that match at least one of the patterns in this list. Patterns must be separated by commas. Patterns in excludes take precedence over patterns in includes. no
excludes Do not check out files that match at least one of the patterns in this list. Patterns must be separated by commas. Patterns in excludes take precedence over patterns in includes. no
label Check out files as of this label. The label must exist in starteam or an exception will be thrown. If not specified, the most recent version of each file will be checked out. no
recursive Indicates if subfolders should be searched for files to check out. Defaults to "true". no
forced If true, checkouts will occur regardless of the status that StarTeam is maintaining for the file. If rootlocalfolder is set then this should be set "true" as otherwise the checkout will be based on statuses which do not relate to the target folder. Defaults to "false". no
* Either the URL attribute or all four of the servername, serverport, projectname and viewname attributes must be defined.

Examples

  <stcheckout servername="STARTEAM" 
            serverport="49201"
            projectname="AProject" 
            viewname="AView"
            username="auser"
            password="secret"
            rootlocalfolder="C:\dev\buildtest\co"
	    force="true"
  />
The minimum necessary to check out files out from a StarTeam server. This will check out all files in the AView view of the AProject project to C:\dev\buildtest\co. Empty folders in StarTeam will have local folders created for them and any non-StarTeam files found in the tree will be deleted. Or more simply:
  <stcheckout URL="STARTEAM:49201/Aproject/AView" 
            username="auser"
            password="secret"
            rootlocalfolder="C:\dev\buildtest\co"
	    force="true"
  />


  <stcheckout URL="STARTEAM:49201/Aproject/AView" 
            username="auser"
            password="secret"
            rootlocalfolder="C:\dev\buildtest\co"
            rootstarteamfolder="\Dev"
            excludes="*.bak *.old"
            label="v2.6.001"
	    force="true"
  />
This will checkout all files from the Dev folder and below that do not end in .bak or .old with the label v2.6.001.
  <stcheckout URL="STARTEAM:49201/Aproject/AView"
            username="auser"
            password="secret"
            rootlocalfolder="C:\dev\buildtest\co"
            includes="*.htm,*.html"
            excludes="index.*"
	    force="true"
  />
This is an example of overlapping includes and excludes attributes. Because excludes takes precedence over includes, files named index.html will not be checked out by this command.
  <stcheckout URL="STARTEAM:49201/Aproject/AView"
            username="auser"
            password="secret"
            rootlocalfolder="C:\dev\buildtest\co"
            includes="*.htm,*.html"
            excludes="index.*"
	    force="true"
	    recursive="false"
  />
This example is like the previous one, but will only check out files in C:\dev\buildtest\co, because of the turning off of the recursive attribute.
  <stcheckout URL="STARTEAM:49201/Aproject/AView"
            username="auser"
            password="secret"
            rootstarteamfolder="src/java"
            rootlocalfolder="C:\dev\buildtest\co"
	    force="true"
  />


  <stcheckout URL="STARTEAM:49201/Aproject/AView"
            username="auser"
            password="secret"
            rootstarteamfolder="src/java"
  />


 <stcheckout URL="STARTEAM:49201/Aproject/AView"
            username="auser"
            password="secret"
            rootstarteamfolder="src/java"
            rootlocalfolder="C:\dev\buildtest\co\src\java"
	    force="true"
  />
In the preceding three examples, assuming that the AProject project has a default folder of "AProject", the first example will check the files located in starteam under src/java out to a tree rooted at C:\dev\buildtest\co, the second to a tree rooted at C:\dev\buildtest\co\AProject\src\java and the third to a tree rooted at C:\dev\buildtest\co\src\java.

STLabel

Description

Creates a view label in StarTeam at the specified view. The label will be classified by StarTeam as a "build label". This task will fail if there already exexists in viewname a label with the same name as the label parameter.

Parameters

username The username of the account used to log in to the StarTeam server. yes
password The password of the account used to log in to the StarTeam server. yes
URL A string of the form "servername:portnum/project/view" which enables user to set all of these elements in one string. yes*
servername The name of the StarTeam server. yes*
serverport The port number of the StarTeam server. yes*
projectname The name of the StarTeam project. yes*
viewname The name of the view in the StarTeam project. yes*
label The name to be given to the label yes
lastbuild The timestamp of the build that will be stored with the label. Must be formatted yyyyMMddHHmmss yes
description A description of the view to be stored in the StarTeam project. no
* Either the URL attribute or all four of the servername, serverport, projectname and viewname attributes must be defined.

Examples

This example shows the use of this tag. It will create a label named Version 6.2 with "Thorough description" as its description.
  <tstamp>
    <format property="nowstamp" pattern="yyyyMMddHHmmss" locale="en"/>
  </tstamp>  
  <starteamlabel URL="STARTEAM:49201/Aproject/AView"
            username="auser"
            password="secret"
            label="Version 6.2"
            lastbuild="${nowstamp}"
            description-"Thorough description"
  />

Starteam

Deprecated

This task has been deprecated. Use the STCheckout task instead.

Description

Checks out files from a StarTeam project.

The includes and excludes attributes function differently from other tasks in Ant. Multiple patterns must be separated by spaces, not commas. See the examples for more information.

Parameters

Attribute Description Required
username The username of the account used to log in to the StarTeam server. yes
password The password of the account used to log in to the StarTeam server. yes
servername The name of the StarTeam server. yes
serverport The port number of the StarTeam server. yes
projectname The name of the StarTeam project. yes
viewname The name of the view in the StarTeam project. yes
targetfolder The folder to which files are checked out. What this precisely means is determined by the targetFolderAbsolute param. yes
targetFolderAbsolute Determines how targetfolder is interpreted, that is, whether the StarTeam "default folder" for the project is factored in (false) or whether targetFolder is a complete mapping to foldername (true). If "true", the target tree will be rooted at targetfolder+"default folder". If false, the target tree will be rooted at targetfolder. Defaults to "false". no
foldername The subfolder in the project from which to check out files. no
force Overwrite existing folders if this is set to "true". Defaults to "false". no
recursion Indicates if subfolders should be searched for files to check out. Defaults to "true". no
verbose Provides progress information. Defaults to "false". no
includes Only check out files that match at least one of the patterns in this list. Patterns must be separated by spaces. Patterns in excludes take precedence over patterns in includes. no
excludes Do not check out files that match at least one of the patterns in this list. Patterns must be separated by spaces. Patterns in excludes take precedence over patterns in includes. no

Examples

  <starteam servername="STARTEAM" 
            serverport="49201"
            projectname="AProject" 
            viewname="AView"
            username="auser"
            password="secret"
            targetfolder="C:\dev\buildtest\co"
  />
The minimum necessary to check out files out from a StarTeam server. This will check out all files in the AView view of the AProject project to C:\dev\buildtest\co.
  <starteam servername="STARTEAM" 
            serverport="49201"
            projectname="AProject" 
            viewname="AView"
            username="auser"
            password="secret"
            targetfolder="C:\dev\buildtest\co"
            foldername="\Dev"
            excludes="*.bak *.old"
            force="true"
  />
This will checkout all files from the Dev folder and below that do not end in .bak or .old. The force flag will cause any existing files to be overwritten by the version in StarTeam.
  <starteam servername="STARTEAM" 
            serverport="49201"
            projectname="AProject" 
            viewname="AView"
            username="auser"
            password="secret"
            targetfolder="C:\dev\buildtest\co"
            includes="*.htm *.html"
            excludes="index.*"
  />
This is an example of overlapping includes and excludes attributes. Because excludes takes precedence over includes, files named index.html will not be checked out by this command.
 <starteam servername="STARTEAM" 
            serverport="49201"
            projectname="AProject" 
            foldername="src/java"
            viewname="AView"
            username="auser"
            password="secret"
            targetfolder="C:\dev\buildtest\co"
            targetfolderabsolute="true"
  />


 <starteam servername="STARTEAM" 
            serverport="49201"
            projectname="AProject" 
            foldername="src/java"
            viewname="AView"
            username="auser"
            password="secret"
            targetfolder="C:\dev\buildtest\co"
            targetfolderabsolute ="false"
  />


 <starteam servername="STARTEAM" 
            serverport="49201"
            projectname="AProject" 
            foldername="src/java"
            viewname="AView"
            username="auser"
            password="secret"
            targetfolder="C:\dev\buildtest\co\src\java"
            targetfolderabsolute="true"
  />
In the preceding three examples, assuming that the AProject project has a default folder of "AProject", the first example will check the files located in starteam under src/java out to a tree rooted at C:\dev\buildtest\co, the second to a tree rooted at C:\dev\buildtest\co\AProject\src\java and the third to a tree rooted at C:\dev\buildtest\co\src\java.

Copyright © 2000,2001 Apache Software Foundation. All rights Reserved.