IBM Support

About creating a UCM component in a VOB

Technote (FAQ)


Question

Why can a new component be created within a IBM® Rational® ClearCase® UCM Multiple Component VOB even if the subdirectory (that it will use as its root) does not exist yet?

Answer


It is possible to create a new component in a VOB using GUI functionality in Project Explorer or from command line using cleartool mkcomp.

Creating a sub-directory in a VOB and adding it to source control for it to act as the component root directory is not required when creating a new component in a VOB.

This feature will create both the component root directory and the UCM component with a single operation or command.


Component Root Directory

The creation of a new component root directory (crd) is not dependent on the existence of a directory element in the Multi-Component VOB.

The component root directory that gets created is not from an existing subdirectory in the VOB, even if a subdirectory already exist in the VOB with the same name.

The crd that is created is a new directory element that is visible from within a UCM view for the purpose of working in a UCM project. Hence, the new directory element will not appear in a non-UCM view as a subdirectory in the Multi-Component VOB.

Note: If you want to use an existing sub-directory as a UCM component, then use the option for importing a VOB directory as a component, which will create a ComponentRootDir hyperlink in the existing directory. This option will not create a new directory element, refer to technote 1240724 for more details.

To avoid confusion, it is advised to manage your UCM environment in a manner where sub-directories in the Multi-Component VOB do not have identical names as UCM components.

If you are unsure as to whether a directory element is in fact serving as a root directory for a UCM component, refer to technote 1147165 for directions on how to determine if the sub-directory is in fact the root of a component.



Create a Component in a VOB

Here is an illustration of creating a new component in a VOB using either GUI or CLI functionality.

Note: Prior to Rational ClearCase 7.0, the VOB must be mounted for this operation to complete successfully. Otherwise, Error Creating Component, will appear and cause the operation to fail. The error will also appear and cause the operation to fail if the VOB selected for the component was created as a single component VOB.

GUI

  1. In Project Explorer right-click Components > New > Component in a VOB ...



  2. After filling in the required fields click OK, and you are prompted to enter a view to use:

    Note: The operation can only be completed within a view context, but you can use either a UCM or non-UCM view.



  3. Select a view from the drop-down list click OK, and the new component will appear under the Components folder in Project Explorer:



  4. The new component's Properties will show the root directory as VOB\dir, but is only visible in a UCM view and intended for use when working in a UCM project:



CLI

  1. Open a Command Prompt (cmd) and execute the following command:

    M:\proj1_int_vu\multivob>cleartool mkcomp -root my_new_comp my_new_comp@\pvob1
    Created component "my_new_comp".

    Unix example: cleartool mkcomp -root /vobs/my_new_comp my_new_comp@/vobs/pvob1
  2. The new component's Properties will show the root directory as VOB\dir, but is only visible within a UCM view and is intended for use when working in a UCM project:

    M:\proj1_int_vu\multivob>cleartool lscomp -long component:my_new_comp@\pvob1
    "my_new_comp"
    2006-08-04T10:49:35-04 by jdoe.group@host
     root directory: "\multivob\my_new_comp"
     owner: jdoe
     group:
    group

Cross reference information
Segment Product Component Platform Version Edition
Software Development Rational ClearCase UCM: Component

Document information

More support for: Rational ClearCase
UCM: Component

Software version: 7.0, 7.0.1, 7.1, 2003.06.00, 2003.06.16

Operating system(s): Windows

Reference #: 1243311

Modified date: 21 April 2010