![]()
|
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
Common Parameters for All Starteam TasksThe following parameters, having to do with making the connection to a StarTeam project, are common to all the following tasks except the deprecated StarTeam task.
STCheckoutDescriptionChecks 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. ParametersSee also the required common StarTeam parameters.
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.
<stcheckout URL="STARTEAM:49201/Aproject/AView" username="auser" password="secret" rootlocalfolder="C:\dev\buildtest\co" forced="true" />And this is a simpler way of accomplishing the same thing as the previous example, using the URL attribute. <stcheckout URL="STARTEAM:49201/Aproject/AView" username="auser" password="secret" rootlocalfolder="C:\dev\buildtest\co" rootstarteamfolder="\Dev" excludes="*.bak *.old" label="v2.6.001" forced="true" />This will check out 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.*" forced="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.*" forced="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" forced="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" forced="true" />In the preceding three examples, assuming that the AProject project has a default folder of "C:\work\AProject", the first example will check out the tree of files rooted in the src/java folder of the AView view of the AProject in the StarTeam repository to a local tree rooted at C:\dev\buildtest\co, the second to a tree rooted at C:\work\AProject\src\java (since no rootlocalfolder is specified) and the third to a tree rooted at C:\dev\buildtest\co\src\java. Note also, that since the second example does not set "forced" true, only those files which the repository considers out-of-date will be checked out. STCheckinDescriptionChecks files into a StarTeam project. Optionally adds files and in the local tree that are not managed by the repository to its control.The includes and excludes attributes function differently from other tasks in Ant. Inclusion/exclusion by folder is NOT supported. ParametersSee also the required common StarTeam parameters.
Examples<stcheckin servername="STARTEAM" serverport="49201" projectname="AProject" viewname="AView" username="auser" password="secret" rootlocalfolder="C:\dev\buildtest\co" forced="true" />The minimum necessary to check files into a StarTeam server. This will check all files on the local tree rooted at C:\dev\buildtest\co
into the AView view of the AProject project in the repository.
For files and folders in the local tree but not in starteam, nothing will be done. Since the forced attribute is set, the files which are checked in will be checked in without regard to what the StarTeam repository considers their status to be. This is a reasonable choice of attributes since StarTeam's status for a file is calculated based on the local file in the StarTeam default directory, not on the directory we are actually working with.
<stcheckin URL="STARTEAM:49201/Aproject/AView" username="auser" password="secret" rootlocalfolder="C:\dev\buildtest\co" forced="true" />And this is a simpler way of giving the same commands as the command above using the URL shortcut. <stcheckin URL="STARTEAM:49201/Aproject/AView" username="auser" password="secret" rootlocalfolder="C:\dev\buildtest\co" rootstarteamfolder="\Dev" excludes="*.bak *.old" forced="true" />This will check all files in to the Dev folder and below that do not end in .bak or .old from the tree rooted at"C:\dev\buildtest\co" . <stcheckin URL="STARTEAM:49201/Aproject/AView" username="auser" password="secret" rootlocalfolder="C:\dev\buildtest\co" includes="*.htm,*.html" excludes="index.*" forced="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 in by this command.
<stcheckin URL="STARTEAM:49201/Aproject/AView" username="auser" password="secret" rootlocalfolder="C:\dev\buildtest\co" rootstarteamfolder="src/java" includes="*.htm,*.html" excludes="index.*" forced="true" recursive="false" />This example is like the previous one, but will only check in files from C:\dev\buildtest\co, because of the turning off of the recursive attribute. <stcheckin URL="STARTEAM:49201/Aproject/AView" username="auser" password="secret" rootlocalfolder="C:\dev\buildtest\co" rootstarteamfolder="src/java" includes="version.txt" forced="true" recursive="false" />This example is like the previous one, but will only check only in one file, C:\dev\buildtest\co\version.txt to the StarTeam folder src/java. <stcheckin URL="STARTEAM:49201/Aproject/AView" username="auser" password="secret" rootlocalfolder="C:\dev\buildtest\co" rootstarteamfolder="src/java" includes="version.java" forced="true" recursive="false" addUncontrolled="true" comment="Fix Bug #667" />This example is like the previous one, but will only check only in one file, C:\dev\buildtest\co\version.java to the StarTeam folder src/java. Because the addUncontrolled attribute has been set, if StarTeam does not already control this file in this location, it will be added to the repository. Also, it will write a comment to the repository for this version of the file. <stcheckin URL="STARTEAM:49201/Aproject/AView" username="auser" password="secret" rootstarteamfolder="src/java" rootlocalfolder="C:\dev\buildtest\co" forced="true" /> <stcheckin URL="STARTEAM:49201/Aproject/AView" username="auser" password="secret" rootstarteamfolder="src/java" /> <stcheckin URL="STARTEAM:49201/Aproject/AView" username="auser" password="secret" rootstarteamfolder="src/java" rootlocalfolder="C:\dev\buildtest\co\src\java" forced="true" />In the preceding three examples, assuming that the AProject project has a default folder of C:\work\buildtest\co\AProject, the first example will check in files from a tree rooted at C:\dev\buildtest\co, the second from a tree rooted at C:\work\buildtest\co\AProject\src\java, and the third from a tree rooted at C:\dev\buildtest\co\src\java all to a tree rooted at src/java STLabelDescriptionCreates 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.ParametersSee also the required common StarTeam parameters.
ExamplesThis 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> <stlabel URL="STARTEAM:49201/Aproject/AView" username="auser" password="secret" label="Version 6.2" lastbuild="${nowstamp}" description="Thorough description" /> STListDescriptionProduces a listing of the contents of the StarTeam repository at the specified view and StarTeamFolder. The listing will contain the name of the user, if any, who has the file locked, the size of the file, its lastModifiedDate in the repository, and the name of the file. Unless the rootLocalFolder is specified, listing will also show the status of the local file in the default local directory relative to the repository.ParametersSee also the required common StarTeam parameters.
Examples<stlist url="WASHINGTON:49201/build" username="auser" password="secret" />The above command might produce the following listing: [stlist] Folder: Build (Default folder: C:/work/build) [stlist] Folder: dev (Default folder: C:/work/build/dev) [stlist] Missing George Hacker 1/1/02 7:25:49 PM CST 36 Test01.properties [stlist] Folder: test (Default folder C:/work/build/dev/test)while adding a rootlocalfolder and an excludes param ... <stlist url="WASHINGTON:49201/build" username="auser" password="secret" rootlocalfolder="srcdir2" excludes="*.properties" />might produce this listing. The status is missing because we are not going against the default folder. [stlist] overriding local folder to srcdir2 [stlist] Folder: Build (Local folder: srcdir2) [stlist] Folder: dev (Local folder: srcdir2/dev) [stlist] Folder: test (Local folder: srcdir2/dev/test) StarteamDeprecatedThis task has been deprecated. Use the STCheckout task instead. DescriptionChecks 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
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 © 2001-2002 Apache Software Foundation. All rights Reserved. |