You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

starteam.html 16 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Apache Ant User Manual</title>
  5. </head>
  6. <body>
  7. <h1>StarTeam Support</h1>
  8. <ul>
  9. <!-- <li><a href="#stcheckin">STCheckin</a></li>-->
  10. <li><a href="#stcheckout">STCheckout</a></li>
  11. <li><a href="#stlabel">STLabel</a></li>
  12. <li><a href="#starteam"><i>StarTeam (deprecated) </i></a></li>
  13. </ul>
  14. <p>
  15. These tasks make use of functions from the StarTeam API. As a result
  16. they are only available to licensed users of StarTeam. You must have
  17. <CODE>starteam-sdk.jar</CODE> in your classpath to run these tasks.
  18. For more information about the StarTeam API and how to license it, see
  19. the <a href="http://www.starbase.com">StarBase</a> web site.</p>
  20. <hr></hr>
  21. <a name="stcheckout">
  22. <h2>STCheckout</h2></a>
  23. <h3>Description</h3>
  24. Checks out files from a StarTeam project.
  25. <p>
  26. The <i>includes</i> and <i>excludes</i> attributes function differently from
  27. other tasks in Ant. Inclusion/exclusion by folder is NOT supported.
  28. </p>
  29. <h3>Parameters</h3>
  30. <table border="1" cellpadding="2" cellspacing="0">
  31. <tr>
  32. <td valign="top">username</td>
  33. <td valign="top">The username of the account used to log in to the StarTeam server.</td>
  34. <td align="center" valign="top">yes</td>
  35. </tr>
  36. <tr>
  37. <td valign="top">password</td>
  38. <td valign="top">The password of the account used to log in to the StarTeam server.</td>
  39. <td align="center" valign="top">yes</td>
  40. </tr>
  41. <tr>
  42. <td valign="top">URL</td>
  43. <td valign="top">A string of the form <code>"servername:portnum/project/view</code>
  44. which enables user to set all of these elements in one string. </td>
  45. <td align="center" valign="top">yes*</td>
  46. </tr> <tr>
  47. <td valign="top">servername</td>
  48. <td valign="top">The name of the StarTeam server.</td>
  49. <td align="center" valign="top">yes*</td>
  50. </tr>
  51. <tr>
  52. <td valign="top">serverport</td>
  53. <td valign="top">The port number of the StarTeam server.</td>
  54. <td align="center" valign="top">yes*</td>
  55. </tr>
  56. <tr>
  57. <td valign="top">projectname</td>
  58. <td valign="top">The name of the StarTeam project.</td>
  59. <td align="center" valign="top">yes*</td>
  60. </tr>
  61. <tr>
  62. <td valign="top">viewname</td>
  63. <td valign="top">The name of the view in the StarTeam project.</td>
  64. <td align="center" valign="top">yes*</td>
  65. </tr>
  66. <tr>
  67. <td valign="top">rootstarteamfolder</td>
  68. <td valign="top">The root of the subtree in the StarTeam repository from which to
  69. check out files. Defaults to the root folder of the view ('/'). </td>
  70. <td align="center" valign="top">no</td>
  71. </tr>
  72. <tr>
  73. <td valign="top">rootlocalfolder</td>
  74. <td valign="top">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 <i>rootstarteamfolder</i> is used.</td>
  75. <td align="center" valign="top">no</td>
  76. </tr>
  77. <tr>
  78. <td valign="top">createworkingdirs</td>
  79. <td valign="top">creates local folders even when the corresponding StarTeam folder is empty. Defaults to "true".</td>
  80. <td align="center" valign="top">no</td>
  81. </tr>
  82. <tr>
  83. <td valign="top">deleteuncontrolled</td>
  84. <td valign="top">if true, any files NOT in StarTeam will be deleted. Defaults to "true".</td>
  85. <td align="center" valign="top">no</td>
  86. </tr>
  87. <tr>
  88. <td valign="top">includes</td>
  89. <td valign="top">Only check out files that match at least one of the patterns in this list. Patterns must be separated by <i>commas</i>. Patterns in <i>excludes</i> take precedence over patterns in <i>includes</i>.</td>
  90. <td align="center" valign="top">no</td>
  91. </tr>
  92. <tr>
  93. <td valign="top">excludes</td>
  94. <td valign="top">Do not check out files that match at least one of the patterns in this list. Patterns must be separated by <i>commas</i>. Patterns in <i>excludes</i> take precedence over patterns in <i>includes</i>.</td>
  95. <td align="center" valign="top">no</td>
  96. </tr>
  97. </table>
  98. * Either the URL attribute or <b>all four</b> of the servername, serverport, projectname and viewname attributes must be defined. <br/>
  99. <h3>Examples</h3>
  100. <pre>
  101. &lt;stcheckout servername="STARTEAM"
  102. serverport="49201"
  103. projectname="AProject"
  104. viewname="AView"
  105. username="auser"
  106. password="secret"
  107. rootlocalfolder="C:\dev\buildtest\co"
  108. /&gt;
  109. </pre>
  110. The minimum necessary to check out files out from a StarTeam server. This will
  111. check out all files in the <i>AView</i> view of the <i>AProject</i> project to
  112. <code>C:\dev\buildtest\co</code>. Empty folders in StarTeam will have local folders
  113. created for them and any non-StarTeam files found in the tree will be deleted.
  114. Or more simply:
  115. <pre>
  116. &lt;stcheckout URL="STARTEAM:49201/Aproject/AView"
  117. username="auser"
  118. password="secret"
  119. rootlocalfolder="C:\dev\buildtest\co"
  120. /&gt;
  121. </pre>
  122. <br></br>
  123. <pre>
  124. &lt;stcheckout URL="STARTEAM:49201/Aproject/AView"
  125. username="auser"
  126. password="secret"
  127. rootlocalfolder="C:\dev\buildtest\co"
  128. rootstarteamfolder="\Dev"
  129. excludes="*.bak *.old"
  130. /&gt;
  131. </pre>
  132. This will checkout all files from the <i>Dev</i> folder and below that do not
  133. end in <i>.bak</i> or <i>.old</i>.
  134. <pre>
  135. &lt;stcheckout URL="STARTEAM:49201/Aproject/AView"
  136. username="auser"
  137. password="secret"
  138. rootlocalfolder="C:\dev\buildtest\co"
  139. includes="*.htm,*.html"
  140. excludes="index.*"
  141. /&gt;
  142. </pre>
  143. This is an example of overlapping <i>includes</i> and <i>excludes</i> attributes. Because
  144. <i>excludes</i> takes precedence over <i>includes</i>, files named <code>index.html</code> will
  145. not be checked out by this command.
  146. <pre>
  147. &lt;stcheckout URL="STARTEAM:49201/Aproject/AView"
  148. username="auser"
  149. password="secret"
  150. rootstarteamfolder="src/java"
  151. rootlocalfolder="C:\dev\buildtest\co"
  152. /&gt;
  153. </pre>
  154. <br></br>
  155. <pre>
  156. &lt;stcheckout URL="STARTEAM:49201/Aproject/AView"
  157. username="auser"
  158. password="secret"
  159. rootstarteamfolder="src/java"
  160. /&gt;
  161. </pre>
  162. <br></br>
  163. <pre>
  164. &lt;stcheckout URL="STARTEAM:49201/Aproject/AView"
  165. username="auser"
  166. password="secret"
  167. rootstarteamfolder="src/java"
  168. rootlocalfolder="C:\dev\buildtest\co\src\java"
  169. /&gt;
  170. </pre>
  171. In the preceding three examples, assuming that the AProject project has a default folder of
  172. "AProject", the first example will check the files located in starteam under src/java out to a tree rooted at C:\dev\buildtest\co,
  173. 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.
  174. <a name="stlabel">
  175. <h2>STLabel</h2></a>
  176. <h3>Description</h3>
  177. 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 <i>viewname</i> a label with the same name as the <i>label</i> parameter.
  178. <h3>Parameters</h3>
  179. <table border="1" cellpadding="2" cellspacing="0">
  180. <tr>
  181. <td valign="top">username</td>
  182. <td valign="top">The username of the account used to log in to the StarTeam server.</td>
  183. <td align="center" valign="top">yes</td>
  184. </tr>
  185. <tr>
  186. <td valign="top">password</td>
  187. <td valign="top">The password of the account used to log in to the StarTeam server.</td>
  188. <td align="center" valign="top">yes</td>
  189. </tr>
  190. <tr>
  191. <td valign="top">URL</td>
  192. <td valign="top">A string of the form <code>"servername:portnum/project/view"</code>
  193. which enables user to set all of these elements in one string. </td>
  194. <td align="center" valign="top">yes*</td>
  195. </tr> <tr>
  196. <td valign="top">servername</td>
  197. <td valign="top">The name of the StarTeam server.</td>
  198. <td align="center" valign="top">yes*</td>
  199. </tr>
  200. <tr>
  201. <td valign="top">serverport</td>
  202. <td valign="top">The port number of the StarTeam server.</td>
  203. <td align="center" valign="top">yes*</td>
  204. </tr>
  205. <tr>
  206. <td valign="top">projectname</td>
  207. <td valign="top">The name of the StarTeam project.</td>
  208. <td align="center" valign="top">yes*</td>
  209. </tr>
  210. <tr>
  211. <td valign="top">viewname</td>
  212. <td valign="top">The name of the view in the StarTeam project.</td>
  213. <td align="center" valign="top">yes*</td>
  214. </tr>
  215. <tr>
  216. <td valign="top">label</td>
  217. <td valign="top">The name to be given to the label</td>
  218. <td align="center" valign="top">yes</td>
  219. </tr>
  220. <tr>
  221. <td valign="top">lastbuild</td>
  222. <td valign="top">The timestamp of the build that will be stored with the label. Must be formatted <code>yyyyMMddHHmmss</code></td>
  223. <td align="center" valign="top">yes</td>
  224. </tr>
  225. <tr>
  226. <td valign="top">description</td>
  227. <td valign="top">A description of the view to be stored in the StarTeam project.</td>
  228. <td align="center" valign="top">no</td>
  229. </tr>
  230. </table>
  231. * Either the URL attribute or <b>all four</b> of the servername, serverport, projectname and viewname attributes must be defined. <br/>
  232. <h3>Examples</h3>
  233. This example shows the use of this tag. It will create a label named <i>Version 6.2</i> with
  234. <i>"Thorough description"</i> as its description.
  235. <pre>
  236. &lt;tstamp&gt;
  237. &lt;format property="nowstamp" pattern="yyyyMMddHHmmss" locale="en"/&gt;
  238. &lt;/tstamp&gt;
  239. &lt;starteamlabel URL="STARTEAM:49201/Aproject/AView"
  240. username="auser"
  241. password="secret"
  242. label="Version 6.2"
  243. lastbuild="${nowstamp}"
  244. description-"Thorough description"
  245. /&gt;
  246. </pre>
  247. <hr></hr>
  248. <a name="starteam">
  249. <h2>Starteam</h2></a>
  250. <h3><i>Deprecated</i></h3>
  251. <p><i>This task has been deprecated. Use the <a href=#stcheckout">STCheckout</a> task instead.</i></p>
  252. <h3>Description</h3>
  253. Checks out files from a StarTeam project.
  254. <p>
  255. The <i>includes</i> and <i>excludes</i> attributes function differently from
  256. other tasks in Ant. Multiple patterns must be separated by spaces, not
  257. commas. See the examples for more information.</p>
  258. <h3>Parameters</h3>
  259. <table border="1" cellpadding="2" cellspacing="0">
  260. <tr>
  261. <td valign="top"><b>Attribute</b></td>
  262. <td valign="top"><b>Description</b></td>
  263. <td align="center" valign="top"><b>Required</b></td>
  264. </tr>
  265. <tr>
  266. <td valign="top">username</td>
  267. <td valign="top">The username of the account used to log in to the StarTeam server.</td>
  268. <td align="center" valign="top">yes</td>
  269. </tr>
  270. <tr>
  271. <td valign="top">password</td>
  272. <td valign="top">The password of the account used to log in to the StarTeam server.</td>
  273. <td align="center" valign="top">yes</td>
  274. </tr>
  275. <tr>
  276. <td valign="top">servername</td>
  277. <td valign="top">The name of the StarTeam server.</td>
  278. <td align="center" valign="top">yes</td>
  279. </tr>
  280. <tr>
  281. <td valign="top">serverport</td>
  282. <td valign="top">The port number of the StarTeam server.</td>
  283. <td align="center" valign="top">yes</td>
  284. </tr>
  285. <tr>
  286. <td valign="top">projectname</td>
  287. <td valign="top">The name of the StarTeam project.</td>
  288. <td align="center" valign="top">yes</td>
  289. </tr>
  290. <tr>
  291. <td valign="top">viewname</td>
  292. <td valign="top">The name of the view in the StarTeam project.</td>
  293. <td align="center" valign="top">yes</td>
  294. </tr>
  295. <tr>
  296. <td valign="top">targetfolder</td>
  297. <td valign="top">The folder to which files are checked out. What this precisely means is determined by the <i>targetFolderAbsolute</i> param.</td>
  298. <td align="center" valign="top">yes</td>
  299. </tr>
  300. <tr>
  301. <td valign="top">targetFolderAbsolute</td>
  302. <td valign="top">Determines how <i>targetfolder</i> is interpreted, that is, whether the StarTeam "default folder" for the project is factored in (false) or whether <i>targetFolder</i> is a complete mapping to <i>foldername</i> (true).
  303. If "true", the target tree will be rooted at <i>targetfolder+"default folder"</i>. If false, the target tree will be rooted at <i>targetfolder</i>. Defaults to "false". </td>
  304. <td align="center" valign="top">no</td>
  305. </tr>
  306. <tr>
  307. <td valign="top">foldername</td>
  308. <td valign="top">The subfolder in the project from which to check out files.</td>
  309. <td align="center" valign="top">no</td>
  310. </tr>
  311. <tr>
  312. <td valign="top">force</td>
  313. <td valign="top">Overwrite existing folders if this is set to "true". Defaults to "false".</td>
  314. <td align="center" valign="top">no</td>
  315. </tr>
  316. <tr>
  317. <td valign="top">recursion</td>
  318. <td valign="top">Indicates if subfolders should be searched for files to check out. Defaults to "true".</td>
  319. <td align="center" valign="top">no</td>
  320. </tr>
  321. <tr>
  322. <td valign="top">verbose</td>
  323. <td valign="top">Provides progress information. Defaults to "false".</td>
  324. <td align="center" valign="top">no</td>
  325. </tr>
  326. <tr>
  327. <td valign="top">includes</td>
  328. <td valign="top">Only check out files that match at least one of the patterns in this list. Patterns must be separated by spaces. Patterns in <i>excludes</i> take precedence over patterns in <i>includes</i>.</td>
  329. <td align="center" valign="top">no</td>
  330. </tr>
  331. <tr>
  332. <td valign="top">excludes</td>
  333. <td valign="top">Do not check out files that match at least one of the patterns in this list. Patterns must be separated by spaces. Patterns in <i>excludes</i> take precedence over patterns in <i>includes</i>.</td>
  334. <td align="center" valign="top">no</td>
  335. </tr>
  336. </table>
  337. <h3>Examples</h3>
  338. <pre>
  339. &lt;starteam servername="STARTEAM"
  340. serverport="49201"
  341. projectname="AProject"
  342. viewname="AView"
  343. username="auser"
  344. password="secret"
  345. targetfolder="C:\dev\buildtest\co"
  346. /&gt;
  347. </pre>
  348. The minimum necessary to check out files out from a StarTeam server. This will
  349. check out all files in the <i>AView</i> view of the <i>AProject</i> project to
  350. <code>C:\dev\buildtest\co</code>.
  351. <pre>
  352. &lt;starteam servername="STARTEAM"
  353. serverport="49201"
  354. projectname="AProject"
  355. viewname="AView"
  356. username="auser"
  357. password="secret"
  358. targetfolder="C:\dev\buildtest\co"
  359. foldername="\Dev"
  360. excludes="*.bak *.old"
  361. force="true"
  362. /&gt;
  363. </pre>
  364. This will checkout all files from the <i>Dev</i> folder and below that do not
  365. end in <i>.bak</i> or <i>.old</i>. The force flag will cause any existing files to be
  366. overwritten by the version in StarTeam.
  367. <pre>
  368. &lt;starteam servername="STARTEAM"
  369. serverport="49201"
  370. projectname="AProject"
  371. viewname="AView"
  372. username="auser"
  373. password="secret"
  374. targetfolder="C:\dev\buildtest\co"
  375. includes="*.htm *.html"
  376. excludes="index.*"
  377. /&gt;
  378. </pre>
  379. This is an example of overlapping <i>includes</i> and <i>excludes</i> attributes. Because
  380. <i>excludes</i> takes precedence over <i>includes</i>, files named <code>index.html</code> will
  381. not be checked out by this command.
  382. <pre>
  383. &lt;starteam servername="STARTEAM"
  384. serverport="49201"
  385. projectname="AProject"
  386. foldername="src/java"
  387. viewname="AView"
  388. username="auser"
  389. password="secret"
  390. targetfolder="C:\dev\buildtest\co"
  391. targetfolderabsolute="true"
  392. /&gt;
  393. </pre>
  394. <br></br>
  395. <pre>
  396. &lt;starteam servername="STARTEAM"
  397. serverport="49201"
  398. projectname="AProject"
  399. foldername="src/java"
  400. viewname="AView"
  401. username="auser"
  402. password="secret"
  403. targetfolder="C:\dev\buildtest\co"
  404. targetfolderabsolute ="false"
  405. /&gt;
  406. </pre>
  407. <br></br>
  408. <pre>
  409. &lt;starteam servername="STARTEAM"
  410. serverport="49201"
  411. projectname="AProject"
  412. foldername="src/java"
  413. viewname="AView"
  414. username="auser"
  415. password="secret"
  416. targetfolder="C:\dev\buildtest\co\src\java"
  417. targetfolderabsolute="true"
  418. /&gt;
  419. </pre>
  420. In the preceding three examples, assuming that the AProject project has a default folder of
  421. "AProject", the first example will check the files located in starteam under src/java out to a tree rooted at C:\dev\buildtest\co,
  422. 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.
  423. <hr>
  424. <p align="center">
  425. Copyright &copy; 2000,2001 Apache Software Foundation. All rights Reserved.
  426. </p>
  427. </body>
  428. </html>