? Basic ClearCase terminology ? Installing ClearCase LT Server and Client ? ClearCase integration with Application Developer ? A simple scenario using ClearCase with Application Develope
Trang 1744 WebSphere Studio Application Developer Version 5 Programming Guide
A red exclamation mark may indicate that there is a problem with the patch The reason for the failure is found in parenthesis In our case, the exclamation mark indicates that we are adding new files
If all is well, click Finish to apply the patch The workspace now contains outgoing changes for each file modified by the patch, as indicated with > signs in the J2EE Navigator view (Figure 22-51)
Figure 22-51 Results of the patch
As you can see, Test.java, TestBean.java, and TestHome.java files have been added, and ejb-jar.xml and ibm-ejb-jar-bnd.xmi files have been updated by the patch, and are ready to be committed to the CVS repository
Options for applying a patch
To get successful matches of a patch file you have the following options in the wizard:
Go back to the first page of the Resource Patcher wizard and select the correct resource to which the patch should be applied
If a common prefix of the path names stored in the patch file does not match the path names in you current workspace, you can select Ignore leading path name segments (Figure 22-50 on page 743)
Note: To apply the full patch successfully you have to eliminate the problems
(red exclamation marks) and get checked items everywhere by tweaking the options on this wizard page (see “Options for applying a patch” on page 744)
Trang 2 Select the Ignore white space option to make the matching process independent from white space differences between the patch file and files in your workspace
Adjust the maximum fuzz factor that determines how far from its original line a patch is allowed to match The default is two If a patch does not match at the line given in the patch file, the Resource Patcher tries to match the patch fuzz number of lines before or after the position
Use the Reverse patch option for patch files that already have been applied to your workspace This option is also useful to undo or redo a patch
Disconnecting a project
You can disconnect a project from the repository Select the ItsoBank5Utility
project and Team -> Disconnect You are prompted to confirm and also if you want to delete CVS control information (Figure 22-52)
Figure 22-52 Disconnect confirmation CVS adds special directories named CVS to the project and its folders These directories can be deleted or kept on disconnect
Reconnect
You can reconnect a project to the repository (Team -> Share Project)
Reconnect is easier if the CVS folders are still in the project If they were deleted, you are prompted to synchronize your code with the existing repository code
Trang 3746 WebSphere Studio Application Developer Version 5 Programming Guide
Summary
This chapter describes how to set up and configure CVS for working with Application Developer
Through a simple scenario we showed how developers interact with CVS in serial and parallel development We also showed the compare and merge tools and the resource history
CVS provides a simple but efficient team development environment You should consider CVS even in a single workstation environment so that you get the benefits of versioning your own code
Trang 4Chapter 23. Using ClearCase
In this chapter we demonstrate how to use ClearCase LT with Application Developer The following topics are covered:
What is Rational ClearCase?
Basic ClearCase terminology
Installing ClearCase LT Server and Client
ClearCase integration with Application Developer
A simple scenario using ClearCase with Application Developer
23
Trang 5748 WebSphere Studio Application Developer Version 5 Programming Guide
What is Rational ClearCase?
Rational ClearCase is a software configuration management (SCM) product that helps to automate the tasks required to write, release, and maintain software code
Rational ClearCase offers the essential functions of version control, workspace management, process configurability, and build management By automating many of the necessary and error-prone tasks associated with software development, Rational ClearCase helps teams of all sizes build high quality software
ClearCase incorporates Unified Change Management (UCM), Rational's best practices process for managing change at the activity level and controlling workflow
UCM can be applied to projects “out-of-the-box”, enabling teams to get up and running quickly However, it can be replaced with any other process that you already have in place at your site
ClearCase provides support for parallel development With automatic branching and merge support, it enables multiple developers to design, code, test and enhance software from a common code base
Snapshot views support a disconnected use model for working away from the office All changes since the last snapshot are automatically updated once you are connected again
Rational offers two version of the ClearCase product:
ClearCase
ClearCase LT
ClearCase LT is a light version for support of small teams that do not need the full functionality of the complete ClearCase product (distributed servers, database replication, advanced build management, transparent file access) For the full-sized ClearCase, Rational also provides an add-on MultiSite feature
For more information see:
http://www.rational.com/products/clearcase
Note: Application Developer 5.0 includes ClearCase LT.
Trang 6Basic ClearCase terminology
Activity—A unit of work performed by an individual In UCM an activity tracks
a change set, that is, a list of versions of files created to perform the work (for example, Developer 1 fixing problem report #123) When you work on an activity, all versions you create are associated with that activity
Component—A set of related directory and file elements Typically, elements
that make up a component are developed, integrated, and released together
In Application Developer, a component contains one or more projects
Baseline—A version of a project.
Development stream—Each developers’ own working area.
Integration stream—A shared working area for the team, containing the
versions of the components that are available to all developers
Deliver stream—The act of making a developer’s development stream
available to the integration stream, publishing a developer’s work
Rebase—The act of retrieving a project to work on locally, or to synchronize
your development stream with what is available in the integration stream
Check in and check out—A file that is to be edited must be checked out
This lets other developers know that the file is opened by another developer Once a developer completes any edits on a file, it must be checked back in before making the files available to others
VOB (versioned object base)—The permanent data repository where
ClearCase stores files, directories, and metadata
View—A selection of resources in a VOB, a window to the VOB data.
Installing ClearCase LT
Application Developer 5.0 includes both the Rational ClearCase LT Server and Rational ClearCase LT Client products From the Application Developer product installation dialogs you can start the installation of ClearCase LT You can also start the ClearCase LT installation from the Rational_ClearCase_LT directory on the Application Developer 5.0 CD
Installing the ClearCase LT Server component also installs the ClearCase LT Client component We recommend you install the ClearCase LT Server component before installing ClearCase LT Client on any additional machines Detailed instructions on how to install Rational ClearCase LT are provided in the
cc_install.pdf file, which is located on the Application Developer 5.0 CD in:
Trang 7750 WebSphere Studio Application Developer Version 5 Programming Guide
Installing ClearCase LT Server
Application Developer includes a license for the ClearCase LT Server product that enables you to install the product locally on your Application Developer machine to try it out, but not to install it on another machine To install it on another machine, you must acquire a separate ClearCase LT Server license
Figure 23-1 shows our setup
Figure 23-1 ClearCase LT setup for this chapter
Notes:
When installing the ClearCase LT Server, you can be logged on either locally on your Windows machine or logged on to a Windows domain If installing while logged on locally, you will only be able to connect to the server from your local machine Other people in your development team will not be able to connect to your machine and use your ClearCase LT Server The user account used when installing must be a member of the local Administrators group
To use ClearCase LT in a team environment and let other team members use your ClearCase LT Server, you must be logged on to a Windows domain with a user account having Domain Administrator privileges while installing ClearCase LT Server The domain must also have a group for the ClearCase users and all members of your development team must be members of this group This group should also be the Primary Group for these users You can use the Domain Users group for this
It is highly recommended to use the Windows domain approach In our example we used this approach.
Windows 2000 Domain Controller logon
logon
Application Developer
Application Developer
ClearCase
LT Client
ClearCase
LT Server
ClearCase
LT Client connect
Trang 8To install ClearCase LT Server, perform these steps:
To start the installation, run setup.exe from the Rational_ClearCase_LT
directory on the Application Developer 5.0 CD
Click Next on the first welcome page
On the Choose Product page, select ClearCase LT Server and click Next
In the popup window that is displayed, click OK to install the product without licensing configured (the license comes with Application Developer 5.0)
Select Yes to accept the licensing agreement on the next page and click Next
On the Select Configuration page, select Typical configuration and verify the install path (we use the default of C:\Program Files\Rational) Click Next
If the Update Shared Components dialog is displayed, click Next
Click Next on the Confirmation dialog to start the installation
When the product is installed, select Restart and then click Finish to reboot your machine
After the machine has rebooted the installation continues and when done it displays an Error Summary asking you to associate a license with the ClearCase LT Server You do not have to do this so click Next on the Error Summary page
On the Installation Complete page, click Finish
The ClearCase LT Server Wizard is now displayed The wizard guides you through the process of creating a ClearCase storage directory, a ClearCase VOB and setting up a ClearCase project On the first page of the wizard click Next
On the second page, select a directory to store your ClearCase VOB files Keep the default and click Next
On the third page, keep the default VOB name sources and deselect the Import projects Click Next
On the fourth page, keep the default project name InitialProject and click Next
On the Summary page, click Next and when the setup is done click OK on the final dialog
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 The Web site can be found at:
Trang 9752 WebSphere Studio Application Developer Version 5 Programming Guide
Installing the ClearCase LT client
To install ClearCase LT Client perform these steps:
To start the installation, run setup.exe from the Rational_ClearCase_LT
directory on the Application Developer 5.0 CD
Click Next on the first welcome page
On the Choose Product page, select ClearCase LT Client and click Next
In the popup window that is displayed, click OK to install the product without licensing configured (the license comes with Application Developer 5.0)
Select Yes to accept the licensing agreement on the next page and click Next
On the Select Configuration page, select Typical configuration and verify the install path (we use the default of C:\Program Files\Rational) Click Next
If the Update Shared Components dialog is displayed, click Next
Click Next in the Confirmation Dialog
On the ClearCase LT Server Name page, enter the host name of the machine where ClearCase LT Server is installed Click Next
When the product is installed, select Restart and click Finish to reboot your machine
After the machine has rebooted, the installation continues and displays the Installation Complete page Click Finish
ClearCase integration with Application Developer
Application Developer integrates support for ClearCase, allowing easy access to ClearCase features
Note: Installing the ClearCase LT Server component also installs the
ClearCase LT Client component so you do not have to install the client separately on the server machine to access the server
Note: The ClearCase Adapter is a feature during Application Developer
installation It must be installed to make use of ClearCase LT
Trang 10ClearCase help in Application Developer
Application Developer provides limited documentation for using ClearCase To access the help documentation, select Help -> Help Contents to open the new help window Select Rational ClearCase from the Contents view to open the ClearCase help book (Figure 23-2)
Figure 23-2 ClearCase online help
ClearCase preferences
There are a number of ClearCase preferences that you can modify by selecting Window -> Preferences -> Team -> Rational ClearCase (Figure 23-3)
We recommend that you check out files from Rational ClearCase before you edit them However, if you edit a file that is under ClearCase control but is not checked out, Application Developer can automatically check it out if you select Automatically checkout for the setting: When checked-in files are saved by an internal editor
You can specify if you want to automatically connect to ClearCase when you start Application Developer Select Automatically connect to ClearCase on