- Unzip an empty workspace and load a project into the workspace from a Concurrent Versions System (CVS) or a Rational Team Concert (RTC) repository.
- Capture and archive your own empty workspace.
- Download headlessProjectLoadDemo.zip and unzip the following files into a temporary file directory. Refer to the Appendix at the end of this blog entry for a description of each of the files you unzipped.
- Edit setRBDEnvironment.cmd and change variable settings as necessary to be correct for your installation of RBD.
Loading a Project from a CVS Repository
From your temporary directory, run command file runLoadFromCVS.cmd. The command file loads one Java project from the Eclipse EDT open source repository.
When loading from a CVS repository, you identify the projects you want to load in an Eclipse project set (.psf) file. The command file uses the RAD projectSetImport Ant task (shipped in RBD) to import the projects named in the project set file. Which project is loaded by this sample is not
important; the purpose is to show how to load a project from CVS.
You can create a project set file for projects in your own repository by checking
out the projects into RBD and clicking on “Export, Team, Team Project
Set”. The command is a misnomer; it does
not export the projects you select.
Instead it creates a project set file with an entry for each project
identifying the project, branch, and team server from which the project can be
checked out or loaded.
Loading a Project from a Rational Team Concert Repository
You will need to install the RTC Eclipse Client into your RBD IDE before running this sample. Then, from the temporary directory, run command file runLoadFromRTC.cmd. The command file unzips an empty workspace and downloads a small EGL project from the Jazz community sandbox.
With RTC, you specify the projects that you want to load by defining a “repository workspace” to RTC and include the projects you want to load in the repository workspace. The command file uses the teamFetch Ant task to load the projects from the repository workspace into the local RBD workspace.
Capturing your own Empty Workspace
The empty workspaces used in this example have already been captured. When you are ready to apply the examples to your own situation you will want to capture your own empty workspace with preferences set according to the needs of your developers.
capture a workspace:
- Switch to a new workspace in RBD.
- Set workspace preferences as you want them to be for your build.
- If you are using CVS, define a connection to the repository from which your build will load projects.
- Shut down RBD.
- Use the captureWorkspace command file to zip up the workspace:
captureWorkspace d:\workspace_CVS workspace_CVS.zip
Use the SVN command to checkout the projects you want to build into a local directory. Then use the RAD projectImport Ant task from your command file to import the project from the local directory into your RBD workspace.
can export project set files with an “SVN nature” if the Subversive Team Provider is installed in your RBD,
but the projectSetImport Ant task does not appear to work with SVN project set
If you have the Eclipse GIT Team Provider installed on your IDE, you can export project set files with an “Git nature” for projects shared on a Git repository. You can use the projectSetImport Ant task to load the projects named in the project set file.
Use cleartool subcommands or clearcase Ant tasks to load a snapshot view of the projects you want to build. Then use the RAD projectImport Ant task from your command file to import the project from the local directory into your RBD workspace.
Appendix: Files provided in the example
- setRBDEnvironment.cmd - identifies workspace and RDB jar files for running IDE in headless mode
- captureWorkspace.cmd - zips up workspace
- runAntInIDE.cmd - launches Eclipse Ant runner in your RBD workspace
- runAntCmd.cmd - launches Ant build outside of the IDE
- runLoadFromCVS.cmd - unzips workspace and loads project from CVS repository
- runLoadFromRTC.cmd - unzips workspace and loads project from RTC repository
Ant build files:
- UnzipWorkSpace.xml - unzips workspace
- ZipWorkSpace.xml - zips workspace
- LoadProjectSet.xml - loads projects using projectSetImport task
- LoadRepositoryWorkspace.xml - loads projects from RTC repository workspace using teamFetch Ant task
Workspace zip files:
- workspace_CVS.zip - zipped workspace with connection to Eclipse CVS repository
- workspace_RTC.zip - zipped workspace, no connection defined
- projectSet_CVS.psf - set of projects to import from CVS
- password.txt – encrypted RTC password