IBM Support

Using Project Templates in IBM Rational ClearCase UCM

Technote (FAQ)


How do I use Project Templates in IBM Rational ClearCase UCM?


IBM Rational ClearCase, and and later releases provide support for the project template and stream template features in UCM.

Project templates enable ClearCase administrators to define a standard set of policies that meet the governance and compliance needs of a business. Project templates also enable administrators to identify a list of modifiable components and baseline name templates for subsequent projects.

Once a project template has been defined, all subsequent projects that are created in that PVOB pick up the settings from the project template by default. Use of this feature not only ensures consistent policy enablement across projects, but also saves administrators time in identifying the above mentioned parameters for projects.

Do not use older clients with project or stream templates. Older releases of ClearCase that do not include this feature will not make use of a project template when creating a project. To ensure use of a template, you can configure a pre-op trigger to check the client version and reject the operation for older ClearCase clients.

Here is a sample mktrtype command for creating this type of trigger:

ct mktrtype -preop mkproject -ucmobject -all -exec /script-to-check-version pre-mkproject-tr@<pvob-tag>

Administrators can define one project template and one stream template per PVOB. As part of creating a project template administrators can specify policy settings, modifiable components, a baseline naming template and a custom information file name, which is a plain text file.

The content of the custom information file is stored with the project template. ClearCase does not interpret the file content and solely provides a mechanism to store and display the requested text content. You can use this place holder according to project needs such as storing a custom rule section of UCM configuration specifications. Note that template creation, modification, and removal must be done from the PVOB directory.

Creating a project template

The following procedure is an example of the steps you can use to create a project template object.

  • Select your view with the cleartool setview command, where view-tag is a dynamic view that is registered for the current network region. Use the lsview command to list registered view tags.

    cleartool setview view-tag

  • Go to the PVOB directory, using the cleartool mount and cd commands:
    1. cleartool mount pvob-tag
    2. cd pvob-root-dir

  • Create the project template. In the following command, the -template option indicates that this command will create a project template. The -custom option specifies the file name for the custom information file.

cleartool mkproj -template -mod c1,c2 -pol

After you have created a project template, specified template settings are included in subsequent project creation in the PVOB. For example, the project created with the following command picks up the project template settings for that PVOB if one exists:

cleartool mkproject –in RootFolder Project1

Creating a stream template

By using a stream template, an administrator can define a default state of "enabled by stream" policies. The following is an example of using the mkstream command to create a stream template:


Once the stream template has been created, subsequent stream creation will use these policy settings by default but can be overridden by specifying them explicitly on the CLI.

Displaying project information

You can display a description of a project with the lsproject command. For example:

cleartool lsproject -l Project1

project "Project1"


modifiable components:



default rebase promotion level: INITIAL

recommended baselines:

model: DEFAULT






baseline naming template: stream_project

Note that Project1 includes:
· The modifiable components, c1 and c2
· blname_template stream_project as established by the template settings.

To override these default settings, you can specify these options explicitly on the command line interface.

Modifying project and stream templates

You can use the chproj – template and chstream –template commands to modify project and stream templates in several ways.

The following command example adds these modifications to the project template:
· A new modifiable component called c4 is added
· The component c2 is removed from modifiable component list

cleartool chproj -template -amod c4 -dmod c2 -pol POLICY_INTERPROJECT_DELIVER

To modify a stream template to disable policy POLICY_INTRAPROJECT_DELIVER_FOUNDATION_CHANGES, use the following command:


To list templates, use the following commands:

cleartool lsproject –template –l
cleartool lsstream –template -1

To display custom information stored with a template project, use a command of this form:

cleartool lsproj -templ -custom

Older releases of ClearCase will list project and stream templates along with normal projects and streams as part of output from the lsproject and lsstream commands.

Removing project and stream templates

To remove templates, use the following commands:

cleartool rmproject –template
cleartool rmstream –template

Document information

More support for: Rational ClearCase

Software version: 7.0.1, 7.1.1

Operating system(s): AIX, HP-UX, Linux, Solaris, Windows

Reference #: 1392361

Modified date: 18 January 2011