Skip to main content

IBM WebSphere Developer Technical Journal: Integrating Rational ClearCase LT and WebSphere Studio Application Developer

Reginaldo Barosa (rbarosa@us.ibm.com), Certified IT Specialist, WebSpeed Team IBM Boston
Reginaldo W. Barosa is an IBM Certified Application Development Specialist. He provides sales support, helping customers with WebSphere application development tools such as VisualAge for Java, VisualAge Generator, WebSphere Studio, and other products. Currently he works with the IBM Webspeed Team. Before joining IBM US, Reginaldo worked for 27 years in IBM Brazil. He has authored IBM Redbooks, many articles, and two books: Aprenda VisualAge for Java em alguns dias, Sao Paulo (Brasport, 1998) and Gerando Java com VisualAge Versao 2, Sao Paulo (Brasport, 1999). Recently, he wrote the following articles: Publishing EJBs with WebSphere Studio and VisualAge for Java and Generating Java and JSPs using VisualAge Generator 4.5. You can reach Reginaldo at rbarosa@us.ibm.com.

Summary:  This article details the necessary steps to get started using Rational ClearCase LT, which is included with WebSphere Studio Application Developer. The article also demonstrates how to place your WebSphere Studio Application Developer projects under Rational ClearCase LT source control, and how to use some of the ClearCase LT options.

Date:  13 Mar 2002
Level:  Introductory
Activity:  347 views

© 2002 International Business Machines Corporation. All rights reserved.

Introduction

Rational ClearCase LT is a software configuration management (SCM) system that helps to automate the tasks required to write, release, and maintain software code. This article details the necessary steps to get started using Rational ClearCase LT , which is included with WebSphere® Studio Application Developer . The article demonstrates how to place your WebSphere Studio Application Developer projects under Rational ClearCase LT source control, and how to use some of the ClearCase LT options.

When you install Application Developer, you will be prompted to select the version control interface that you want to use. If you wish to work in a team development environment, you must select either the CVS (Concurrent Versions System) or the Rational ClearCase check box. To walk through this article, select Rational ClearCase at this time. If you have already installed Application Developer on your machine, refer to the section, Install the Application Developer Version Control Interface (the ClearCase LT client) .

Other SCM repositories can be integrated with Application Developer through WebSphere Studio Workbench SCM adaptors. If you want to work with another SCM provider, SCM adaptors for commercial SCM products are provided by the vendors of those products. For a list of SCM products and adaptors provided by IBM Business Partners, go to the WebSphere Studio Application Developer: SCM Adaptor Vendors Web page. From this list, you can access the SCM product vendors' Web sites to download the SCM adaptor of your choice. IBM does not endorse or warrant these adaptors. For support or further information, please contact the SCM product vendor directly.


Install the ClearCase LT server

Neither the CVS nor the Rational ClearCase server is automatically installed -- you must install the server manually after the WebSphere Studio Application Developer installation is complete. The most recent version of the CVS server is available from the CVS Web page . Note that you do not need to install the CVS or ClearCase LT client; you only need to install the server. The client will be installed when Application Developer is installed. For more information about installing and using CVS, refer to the online help.

You can decide whether you want to use Rational ClearCase LT or the full version of Rational ClearCase, but note that the full version is not included with Application Developer. Rational ClearCase LT (both the client and the server) is included with your WebSphere Studio Application Developer license. Instructions on how to install Rational ClearCase LT are provided in the cc_install.pdf file, which is located in the Rational ClearCase LT sub-directory. To start the installation, run setup.exe from the Rational ClearCase LT directory. To use the Rational ClearCase LT license that comes with WebSphere Studio Application Developer, you must install Rational ClearCase LT on the same machine as Application Developer; otherwise, it will not run properly. When you install ClearCase LT, you may ignore any references to obtaining a license as the license will be provided by WebSphere Studio Application Developer.


Figure 1. To install the ClearCase LT server, execute the setup.exe file
Screen capture of the location of the setup.exe file

If you already have ClearCase installed, you must be sure to apply the November 2001 patch or later from Rational. If you are using ClearCase LT, you should install the version of ClearCase LT provided with WebSphere Studio Application Developer, as this version already has the latest patches applied.

When you have installed the ClearCase LT server, review the Rational ClearCase: Upgrades, Patches and Service Releases page on the Rational Web site and make sure that the latest fixes have been applied.


Install the Application Developer Version Control Interface (the ClearCase LT client)

During the Application Developer installation, the Version Control Interface plug-in you select is enabled. You must select Rational ClearCase as the Version Control Interface.


Figure 2. The Select Version Control Interface pane of the InstallShield Wizard
Screen capture of the Select Version Control Interface pane of the InstallShield Wizard showing Rational ClearCase selected

If you have already installed Application Developer and are not sure which version control interface you have installed, execute the .bat file cm_status that is located in the directory, <WSAD_HOME>\plugins\com.rational.clearcase .

If Rational ClearCase was earlier selected, you will see the following results in Figure 3 below.


Figure 3. Command Window displaying results that Rational ClearCase is enabled
Screen capture of Command Window displaying results that Rational ClearCase is enabled

If you earlier selected CVS when you did the installation and want to change the version control interface to Rational ClearCase , you can uninstall Application Developer and then install it again. However, there is another way to switch version controls without having to reinstall. You can execute the enable_clearcase.bat file that is located in the directory, <WSAD_HOME>plugins\com.rational.clearcase . Simply shut down Application Developer and run this .bat file; this will disable the current CVS interface and enable Rational ClearCase. To avoid surprises, delete and re-create your workspace after changing the version control interface.

Before you begin working with ClearCase LT, it is a good idea to first take a look at the ClearCase tutorial. From your Windows® Start menu, select Programs => Rational ClearCase LT Server => Tutorial . See Figure 4 below.


Figure 4. Where to access the ClearCase tutorial
Screen capture showing where to access the ClearCase tutorial

Spend some time reviewing this ClearCase LT tutorial. This tutorial does not demonstrate how to integrate ClearCase LT with Application Developer, but it will give you an idea of how to work with ClearCase LT itself. This is necessary to understand how ClearCase LT integrates with Application Developer.


Some Rational ClearCase terms

Unified Change Management (UCM) An out-of-the-box configuration management process, layered on ClearCase and ClearQuest functionality, for organizing software development teams and their products. Members of a project team use activities and components to organize their work. (Versioned object base) VOB The permanent data repository in which you store files, directories, and metadata. (Files and directories under ClearCase control are called elements , and each checked-in revision of an element is called a version .) Typically, a VOB contains all of the different versions of an element and the metadata such as labels and checkout comments used to describe each version.


Figure 5. A VOB
Diagram of what's contained in a VOB

View Provides a directory tree of one version of each file in your project. In the view, you modify source files, compile them into object modules for testing purposes, and format them into documents. Below is a view named userid_view as seen from the ClearCase Explorer.


Figure 6. A view named userid_view as seen from the ClearCase Explorer
Screen capture of a view named userid_view as seen from ClearCase Explorer
View-tags
A unique, descriptive name for each view. In ClearCase, the view-tag must be unique within a given network region. Choose a name that helps you determine the owner and purpose of the view. Names like myview or work do not describe the view's owner or contents. If you work with more than one view, such generic names can lead to confusion. A view-tag must be a simple name. That is, it must follow the format of a single file or directory name with no special characters or spaces.
Baseline
A ClearCase UCM object that typically represents a stable configuration for one or more components. A baseline identifies activities and one version of every element visible in one or more components. You can create a development stream or rebase an existing development stream from a baseline.
Stream
A long-lived ClearCase object. It is a member of a single UCM project and is a mechanism for creating and recording configurations. A stream identifies the exact set of versions currently available for you to view, modify, or build. UCM uses baselines and activities to describe a stream's configuration. When you create a stream, its original configuration is the same as a baseline. That is, it contains a single version of each element in a component. When you modify a stream's configuration, you assign the modifications to one or more activities. Hence, a stream's configuration is a given baseline plus one or more activities.

Figure 7. A Stream's Configuration
Diagram of a stream's configuration

Rebase A ClearCase UCM operation that makes your development work area current with the set of versions represented by a more recent baseline in the integration stream.


Use ClearCase help in Application Developer

Application Developer provides some help documentation for using Rational ClearCase. The online help details the options that you can find in Application Developer that are relevant to Rational ClearCase. To access the help documentation, start Application Developer and select Help => Help Contents . The Help perspective opens. Select Rational ClearCase from the drop-down menu. See Figure 8 below.


Figure 8. Selecting Rational ClearCase from the drop-down menu in Application Developer's Help perspective
Selecting Rational ClearCase from the drop-down menu in Application Developer's Help perspective

You can always return to the online help when you require further explanations.


Set Rational ClearCase preferences in Application Developer

You can change the Rational ClearCase preferences and configuration options within Application Developer to suit your needs. Using Application Developer, select Window => Preferences . In the Preference dialog, select Rational ClearCase to set the configuration options.


Figure 9. Application Developer's Preferences window open to the Rational ClearCase configuration options
Screen capture of Application Developer's Preferences window open to Rational ClearCase configuration options

Walk through a ClearCase/Application Developer tutorial

Now, we will walk through a simple example of using Rational ClearCase with Application Developer. To make it simple, we will use one Windows workstation with all of the code, including the ClearCase server, installed on the workstation. When you become familiar with some of the basic activities, you will be able to set up a real-world developer's environment where the server may be installed on another server or another operating system. Some activities shown here must be done by the administrator and others by the developers. In our example, we will go through all of the tasks, since the goal is to understand the capabilities of ClearCase integration with Application Developer.

Create a ClearCase VOB (versioned object base)

You could use the VOB that was created during the server installation, but to get familiar with the task, let's create another one. This must be done using ClearCase. To create a VOB, select Programs => Rational ClearCase LT Server => Create VOB . You must enter the VOB-tag: WSAD_VOB . This will be the registered name for the VOB. When you perform operations on a VOB, refer to this VOB-tag.


Figure 10. The VOB Creation Wizard - Name and Major Parameters pane
Screen capture of the VOB Creation Wizard - Name and Major Parameters pane

In our example, since we are using the standalone workstation, this will be created on our local machine. After this command is executed, you will see Figure 11 below.


Figure 11. WSAD_VOB.vbs is now created
WSAD_VOB.vbs is now created

This task is usually done only once during the installation process and it is done by the Administrator.

Associate an Application Developer workspace with a ClearCase view

The term, workspace , has different meanings in Application Developer and in ClearCase. In Application Developer, a workspace is the set of projects a user can work with in a specific instance of Application Developer. In ClearCase, a workspace generally means a Rational ClearCase view. A view provides controlled, versioned access to the exact set of file versions in the VOB.

Before you start adding the Application Developer projects to the ClearCase views, we recommend that you maintain a separate Application Developer workspace for each Rational ClearCase view you use. To associate this workspace with a ClearCase view, complete the following steps:

  1. Copy to another location the Application Developer workspace directory (and its contents) that you want to have under ClearCase, but make sure to keep it in the directory where Application Developer is installed. In this example, I copied from C:\WSAD\workspace to C:\WSAD\workspace_userid_view .

  2. Create a shortcut of the Application Developer startup to point to this newly created workspace. Change its properties and use the -data flag which takes as its argument the path to the new directory where the workspace is stored. In this example, I used: C:\WSAD\wsappdev.exe -data C:\WSAD\workspace_userid_view . Start Application Developer and delete the projects that you don't need.

Connect to ClearCase

Rational ClearCase allows you to work online or offline. If you decide to access the ClearCase server, you must connect to it. Here are the necessary basic steps. Note that normally you need to connect only once to start your task's activities.

To connect to Rational ClearCase within Application Developer (using the J2EE perspective for example), select the ClearCase => Connect to Rational ClearCase menu option or click the ClearCase Connect icon the ClearCase Connect icon . This Connect option is active when you start Application Developer. After you select it, this option becomes grayed out and remains that way for the duration of your Application Developer session; however, other ClearCase options become active. Note that you may select a project to see the ClearCase options active.


Figure 12. Selecting Connect to Rational ClearCase
Screen capture showing Connect to Rational ClearCase selected

Create a new view

We will now create a ClearCase view and connect it to the associated Application Developer workspace. Again, this is done once by the Administrator.

To create a new view, choose the ClearCase => Create New View menu option from within Application Developer. The View Creation Wizard opens. You can use the View Creation Wizard to set up a view.

In the View Creation Wizard, select No to the question, "Will this view be used for working on one of the Projects described in the ClearCase project tree?" We don't want to use ClearCase UCM for this example. Click Next . In the Location dialog, choose a location for the snapshot view. ClearCase copies versions of elements from VOBs into the directory you specify. In our example, this will be: C:\LT\userid_view . Click Finish .


Figure 13. The View Creation Wizard - Choose Location for a Snapshot view pane
Screen capture of the View Creation Wizard - Choose Location for a Snapshot view pane

A Confirm dialog opens. Click OK . Now, the wizard creates the view and the VOB namespace browser starts, allowing you to select the view's contents. This dialog is used to select the elements (files and directories under ClearCase control) that you want to load into your view or unload from the view. If you load a directory element, all of the file and directory elements below the directory are also loaded into the view. ClearCase copies versions of elements from VOBs into the directory you specify.

In our example, select the VOB folder that we created (that is, WSAD_VOB ), click Add , and then click OK .


Figure 14. The Choose Elements to Load pane
Screen capture of the Choose Elements to Load pane

The directory created looks like Figure 15 below.


Figure 15. The new directory created
Screen capture showing the new directory created

At this point, you can begin working with ClearCase LT. I will now show you some of the possible options.

Move a project into ClearCase

Even if you have already created the conditions to work with ClearCase LT, the projects under its workspace are not under the control of ClearCase unless we specify it.

To move Application Developer files that are under ClearCase source control, you can manually move elements or you can run a script that automates the process. To move manually, right-click the project in the Application Developer Navigator View and select the ClearCase => Move Project into ClearCase option from the drop-down menu. ClearCase then prompts you for the directory path to the VOB.


Figure 16. Selecting the Move Project into ClearCase option
Screen capture of the Move Project into ClearCase option

You must also specify the directory path of the VOB that we created.


Figure 17. The Select TestWeb Location pane
Screen capture of the Select TestWeb Location pane

Select the files to be under ClearCase control, and click OK . See Figure 18 below.


Figure 18. The Add Element(s) to Source Control pane
Screen capture of the Add Element(s) to Source Control pane

A dialog, as shown in Figure 19 below, opens showing ClearCase's progress.


Figure 19. Dialog showing ClearCase's progress
Screen capture of dialog showing ClearCase's progress

When complete, a green icon ( icon indicating that the element is currently checked out ) is shown beside each element. This icon indicates that the element is currently checked out of ClearCase. Also, a blue shade underlies ( blue shade indicates that the element is under ClearCase source control ) each element, indicating that the element is under ClearCase source control. See Figure 20 below.


Figure 20. Elements now under ClearCase control
Screen capture showing the elements now under ClearCase control

Note that the elements are physically moved from the Application Developer workspace to the ClearCase view. See Figure 21 below.


Figure 21. The elements are physically moved from the Application Developer workspace to the ClearCase view
Screen capture showing that the elements are physically moved from the Application Developer workspace to the ClearCase View

If you have many projects to move, it is a good idea to use scripts. Refer to Application Developer ClearCase help for details.

One important recommendation! Do not move projects that were created for the WebSphere Test Environment to ClearCase control. Remember that moving projects into ClearCase literally moves the Application Developer projects to another directory. Clearly, this will invalidate any absolute paths hardcoded in any of the metadata files (more specifically if you open the server-cfg.xml file found in the projects where you defined the WebSphere Server Configurations and Instances).

Check in

To check in an element that you previously checked out, right-click the element name within Application Developer and select ClearCase => Check In from the drop-down menu or click the ClearCase Check In icon ClearCase check in icon . A dialog prompts for the folder to be checked in. See Figure 22 below.


Figure 22. The Check In Element(s) pane
Screen capture of the Check In Element(s) pane

Check out

To modify an element that is under source control, right-click the element within Application Developer and select ClearCase => Check Out from the drop-down menu or click the ClearCase Check Out icon ClearCase check out icon .


The Rational ClearCase Explorer

This is a useful tool that can be started from Application Developer by selecting ClearCase => Run ClearCase Explorer . It enables you to manage and view software assets that are under Rational ClearCase control.


Figure 23. The Rational ClearCase Explorer
Screen capture of the Rational ClearCase Explorer

Migrate VisualAge for Java Repository (Envy) to Rational ClearCase

Since Envy is a VisualAge for Java proprietary file, it must be moved to external files and from there added to ClearCase. To do this, you must export the project files you need from the Envy system to a temporary directory in any file system. Next, create a new project in the Rational ClearCase VOB that will contain these files in Application Developer. You then import the files into Application Developer by selecting File => Import in Application Developer. In the Select Destination for Imported Resources dialog box, specify the location of the project folder that you created in the Rational ClearCase VOB. Refer to the migration manual for details. Also there is an IBM partner that offers a tool that can help with this migration. For details of this tool, refer to CodePro Studio .


Conclusion

From within Application Developer, you can perform many Rational ClearCase functions. As we have seen, you can execute some options from the Rational ClearCase menu. You can also select a file, right-click and select the ClearCase option from the drop-down menu or click an icon on the ClearCase toolbar. Figure 24 shows a table of an overview of the Rational ClearCase functions that can be performed from within Application Developer.


Figure 24. Overview of the Rational ClearCase functions that can be performed from within Application Developer
Diagram of the overview of the Rational ClearCase functions that can be performed from within Application Developer

This is just a start. You can use your imagination and start working with ClearCase and Application Developer together. Enjoy!

The following are some publications that complement this article.

Top of page


Resources

About the author

Reginaldo W. Barosa is an IBM Certified Application Development Specialist. He provides sales support, helping customers with WebSphere application development tools such as VisualAge for Java, VisualAge Generator, WebSphere Studio, and other products. Currently he works with the IBM Webspeed Team. Before joining IBM US, Reginaldo worked for 27 years in IBM Brazil. He has authored IBM Redbooks, many articles, and two books: Aprenda VisualAge for Java em alguns dias, Sao Paulo (Brasport, 1998) and Gerando Java com VisualAge Versao 2, Sao Paulo (Brasport, 1999). Recently, he wrote the following articles: Publishing EJBs with WebSphere Studio and VisualAge for Java and Generating Java and JSPs using VisualAge Generator 4.5. You can reach Reginaldo at rbarosa@us.ibm.com.

Comments (Undergoing maintenance)



Trademarks  |  My developerWorks terms and conditions

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere, Rational
ArticleID=13498
ArticleTitle=IBM WebSphere Developer Technical Journal: Integrating Rational ClearCase LT and WebSphere Studio Application Developer
publish-date=03132002
author1-email=rbarosa@us.ibm.com
author1-email-cc=

My developerWorks community

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Rate a product. Write a review.

Special offers