Dashboard > CruiseControl > StarTeam
StarTeam Log In View a printable version of the current page.

Added by Robert Watkins , last edited by Ilkka Laukkanen on Mar 02, 2007  (view change) show comment
Labels: 
(None)

Using starteam with CruiseControl

Quick Start:

  1. Find the starteam-sdk.jar – typically located in <Your StarTeam Client Install Dir>/StarGate SDK/ or <Your StarTeam Client Install Dir>/lib and named either starteam-sdk.jar or starteamXX.jar, where XX is a version number.
  2. Copy this jar to the CruiseControl /main/lib/ directory (renaming it to starteam-sdk.jar, if needed)
    • If you want encryption support, also copy ss.jar, starteam-extensions.jar, jsafe.jar and jsafePure.zip.
  3. Now run the CruiseControl "build" command to build the CruiseControl Jar with StarTeam classes/functionality on board.
  4. That should be it!

Example on how to get your build.xml to match your StarTeam set-up

When I open my Star Team, I select the project "J Projects" and then the view "J Projects". I put the project/view information in the starteamurl property after the ip address and port: starteamurl="192.160.100.70:49201/J Projects/J Projects".

Now that my view is open, I see a directory structure that looks like this:

   J Projects
      cruisebuild
	src

The J Projects is actually the view, so I skip that. So my root folder is cruisebuild\src. This goes in my build.xml as folder="cruisebuild\src".

So my build.xml has the following modificationset:

<modificationset quietperiod="30" dateformat="yyyy-MMM-dd HH:mm:ss">
	<starteam username="jisgreat" password="makeapasswordhere" folder="cruisebuild\src"
 	 starteamurl="192.160.100.70:49201/J Projects/J Projects" />
  </modificationset>

Troubleshooting

Error message while setting up starteam-sdk.jar

While installing CC I realized that it needed the starteam-sdk.jar file. I put that in the CC lib directory and then got the error message below.

[cc]Feb-10 14:54:55 StarTeam      - Problem looking up modifications in StarTeam.
 java.lang.RuntimeException: You are using a client version which is incompatible with this server.
	at com.starbase.starteam.vts.comm.Connection.open(Connection.java:212)
	at com.starbase.starteam.Server.connect(Server.java:1212)
	at com.starbase.starteam.Server.logOnImpl(Server.java:1548)
	at com.starbase.starteam.Server.logOn(Server.java:1294)
	at com.starbase.starteam.StarTeamFinder.openServer(StarTeamFinder.java:38)
	at com.starbase.starteam.StarTeamFinder.openProject(StarTeamFinder.java:56)
	at com.starbase.starteam.StarTeamFinder.openViewWithOverride(StarTeamFinder.java:89)
	at com.starbase.starteam.StarTeamFinder.openView(StarTeamFinder.java:129)
	at net.sourceforge.cruisecontrol.sourcecontrols.StarTeam.getModifications(StarTeam.java:168)
	at net.sourceforge.cruisecontrol.ModificationSet.getModifications(ModificationSet.java:146)
	at net.sourceforge.cruisecontrol.Project.getModifications(Project.java:294)
	at net.sourceforge.cruisecontrol.Project.build(Project.java:148)
	at net.sourceforge.cruisecontrol.Project.execute(Project.java:117)
	at net.sourceforge.cruisecontrol.BuildQueue.serviceQueue(BuildQueue.java:75)
	at net.sourceforge.cruisecontrol.BuildQueue.run(BuildQueue.java:91)
	at java.lang.Thread.run(Thread.java:536)

I did some more digging. First I looked in the StarTeam specific .java files that ship with CC. There was nothing in there regarding StarTeam version compatibility. Then I went looking into various .jar files. It turns out that class files in starteam-sdk.jar are now included in starteam54.jar. When I put starteam54.jar into the CC lib directory and modified the cruisecontrol.bat file to specify this on the classpath, that seems to fix the problem.

Problem setting up the root folder

If you set the root folder incorrectly (e.g. if you set it to folder="J Projects\cruisebuild\src" in the example above), you get this cryptic error:

  [cc] Problem looking up modifications in StarTeam.
  java.lang.NullPointerException
	at net.sourceforge.cruisecontrol.sourcecontrols.StarTeam.addFolderModsToList(StarTeam.java:273)
	at net.sourceforge.cruisecontrol.sourcecontrols.StarTeam.getModifications(StarTeam.java:179)
	at net.sourceforge.cruisecontrol.ModificationSet.getModifications(ModificationSet.java:123)
	at net.sourceforge.cruisecontrol.Project.build(Project.java:147)
	at net.sourceforge.cruisecontrol.Project.execute(Project.java:103)
	at net.sourceforge.cruisecontrol.Main.main(Main.java:79)
	at CruiseControl.main(CruiseControl.java:68)

Try resetting your folder property using the above instructions ("Example on how to get your build.xml to match your StarTeam set-up") until you get it right.

If you want to check against the whole contents of "J Projects", not a subfolder, set it to folder="". You cannot omit folder option.

NOTE: Do not designate a specific folder if you want to start at root level.
<modificationset requiremodification="true" quietperiod="30">
<starteam username="myname" password="abc123" folder=""
starteamurl="stservername:49201/Project/View" />
</modificationset>

Using starteam with Ant

You will sometimes need to use StarTeam inside ant as part of your bootstrapping, build or publishing phase. This will require you to make some files (a jar and perhaps a dll) available to your build script environment. One thing to not overlook is that the default ant version distributed inside CruiseControl isn't configured to run optional tasks by default. So if you plan to use this version of ant, you will need to configure it prior usage.

We advise you to look at your StarTeam documentation to fully use StarTeam with ant.

I found one issue with the building of the cruisecontrol.jar and one issue running cruiscontrol while using "StarTeam SDK 2005 R2". The following files must be edited to match the version of Starteam SDK.

#1. C:[INSTALL_PATH]\cruisecontrol-2.3.1\main\build.xml

*The starteam-sdk.jar must be changed to the name of the jar being placed into "\main\lib".
See corrected line below.

(correct) available file="lib/starteam80.jar" property="starteam-sdk-present
(incorrect) available file="lib/starteam-sdk.jar" property="starteam-sdk-present

#2. C:[INSTALL_PATH]\cruisecontrol-2.3.1\main\bin\cruisecontrol.bat

*(INCORRECT - See "LIBDIR%\starteam-sdk.jar;")
set CRUISE_PATH=%CRUISE_PATH%;%DISTDIR%\cruisecontrol.jar;%LIBDIR%\log4j.jar;%LIBDIR%\jdom.jar;%LIBDIR%\ant\ant.jar;%LIBDIR%\ant\ant-launcher.jar;%LIBDIR%\xercesImpl-2.7.0.jar;%LIBDIR%\xml-apis-2.7.0.jar;%LIBDIR%\xalan-2.6.0.jar;%LIBDIR%\jakarta-oro-2.0.3.jar;%LIBDIR%\mail.jar;%LIBDIR%\junit.jar;%LIBDIR%\activation.jar;%LIBDIR%\commons-net-1.1.0.jar;%LIBDIR%\starteam-sdk.jar;%LIBDIR%\mx4j.jar;%LIBDIR%\mx4j-tools.jar;%LIBDIR%\mx4j-remote.jar;%LIBDIR%\smack.jar;%LIBDIR%\comm.jar;%LIBDIR%\x10.jar;%LIBDIR%\fast-md5.jar;.

*(CORRECT - See "LIBDIR%\starteam80.jar")
set CRUISE_PATH=%CRUISE_PATH%;%DISTDIR%\cruisecontrol.jar;%LIBDIR%\log4j.jar;%LIBDIR%\jdom.jar;%LIBDIR%\ant\ant.jar;%LIBDIR%\ant\ant-launcher.jar;%LIBDIR%\xercesImpl-2.7.0.jar;%LIBDIR%\xml-apis-2.7.0.jar;%LIBDIR%\xalan-2.6.0.jar;%LIBDIR%\jakarta-oro-2.0.3.jar;%LIBDIR%\mail.jar;%LIBDIR%\junit.jar;%LIBDIR%\activation.jar;%LIBDIR%\commons-net-1.1.0.jar;%LIBDIR%\starteam80.jar;%LIBDIR%\mx4j.jar;%LIBDIR%\mx4j-tools.jar;%LIBDIR%\mx4j-remote.jar;%LIBDIR%\smack.jar;%LIBDIR%\comm.jar;%LIBDIR%\x10.jar;%LIBDIR%\fast-md5.jar;.

Links

http://www.borland.com/starteam/
http://cruisecontrol.sourceforge.net/main/configxml.html#starteam
http://ant.apache.org/manual/OptionalTasks/starteam.html

Powered by a free Atlassian Confluence Open Source Project / Non-profit License granted to ThoughtWorks, Inc.. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators