774 WebSphere Studio Application Developer Version 5 Programming Guide In the Choose Location for Snapshot view (Integration View) dialog (Figure 23-34) select C:\ITSO\dev2_IntegrationView as the location for the integration view. Click Next . Figure 23-34 Select location for integration view In the Choose Components dialog, make sure ITSO_VOB is selected and click Finish to create the views. Click OK when the confirmation dialog is displayed and then click OK in the View Creation Status dialog. Developer 2 imports projects into Application Developer Developer 2 works on the same projects as developer 1 and has to import the projects: As developer 2, select ClearCase -> Rebase Stream in Application Developer to update your development stream with the contents of the integration stream. In the Rebase Stream dialog (Figure 23-35) select Projects -> ITSO_Project -> ITSO_Project_Integration -> dev2_View and click OK . Chapter 23. Using ClearCase 775 Figure 23-35 Rebase Stream dialog In the Rebase Stream Preview dialog (Figure 23-36) select ITSO_VOB ITSO_Project_<date> from the baseline drop-down list and verify that dev2_View is selected as the target view. Click OK . Figure 23-36 Rebase Stream Preview - developer 2 Click OK to dismiss the Hijacked Files Warning dialog. The contents of the integration view is now copied to the developer 2’ development view. In the Rebasing in View dialog, click Complete to perform the rebase action. After this click Close . In Application Developer, select File -> Import -> Existing Project into Workspace and click Next (Figure 23-37). Click Browse and select the EAR project and click Finish. C:\ITSO\dev2_View\ITSO_VOB\ITSOProGuideCCEAR 776 WebSphere Studio Application Developer Version 5 Programming Guide Figure 23-37 Import EAR project Repeat the import process for the Web project: C:\ITSO\dev2_View\ITSO_VOB\ITSOProGuideCCWeb Developer 2 adds a new servlet Here are the short instructions for developer 2: Open the Web perspective and select File -> New -> Servlet . Enter itso.cc as the package name and enter ServletB as the class name. Click Next. Verify that Add to web.xml is selected and click Finish . On the Check Out Elements dialog, make sure all three files are selected and click OK . On the Select Activity click New and enter Developer 2 adds ServletB as the name for the activity. Click OK twice. The servlet is being generated. On the Add Element(s) to Source Control dialog, make sure the servlet is selected. Deselect Keep checked out and click OK . On the Select Activity dialog, select the Developer 2 adds ServletB activity and click OK . The servlet is added to the project and to ClearCase source control. Click Ye s on the File Changed dialog. Add your name in the author Javadoc comment. As soon as you start typing in the editor the servlet needs to be checked out (it is checked in because we Note: By now developer 1 and developer 2 are setup with a new shared project. Both can now check out files, work with these files, check them in, and deliver their work to the stream. Chapter 23. Using ClearCase 777 deselected the Keep checked out option). Click OK on the Check Out Elements dialog. On the Select Activity dialog, select the Developer 2 adds ServletB activity and click OK . The file is now checked out which is indicated by the green check mark on the servlet’s icon, . After adding your name as the author press Ctrl-S to save the servlet and then close the editor. This change also updates the web.xml file. The changed files must now be checked in. Select both the itso.cc.ServletB and the Web Content\WEB-INF\web.xml and select Team -> Check in (context). On the Check in Elements dialog, make sure both elements are selected and click OK . The green check marks of the resources icons are removed indicating that the files are no longer checked out. Before developer 2 can deliver the project to the stream the ibm-web-bnd.xml and ibm-web.ext.xmi files need to be checked in as well. As their contents have not changed, ClearCase default settings does not allow them to be checked in, so we need to undo their check out. Select both of them and select Team -> Undo Check Out from the context menu. On the Undo Check Out for Element(s) dialog, make sure both files are selected and click OK . Developer 2 is now ready to deliver the changes to the stream and share the code with the other developers. Before doing this, it is best practice to make sure that no other developer has made changes. Select ClearCase -> Rebase Stream . In the Rebase Stream dialog, select developer 2’s development stream as shown and click OK (Figure 23-38). Figure 23-38 Selecting development stream to rebase In the Rebase Stream Preview dialog (Figure 23-39) make sure the dev2_View view is selected, otherwise click Change -> Browse and select it. Click OK . 778 WebSphere Studio Application Developer Version 5 Programming Guide Figure 23-39 Rebase Stream Preview The Rebase Stream dialog is displayed and notifies you that the stream is currently up-to-date. Click OK to dismiss the information dialog and click Cancel to dismiss the Rebase Stream Preview dialog. Note that what we did was to check to make sure developer 1 did not make any changes to the stream. Developer 2 delivers work to the integration stream Developer 2 is ready to integrate the work: As developer 2, select ClearCase -> Deliver Stream . In the Deliver from Stream dialog (Figure 23-40) select Projects -> ITSO_Project -> ITSO_Project_Integration -> dev2_View . Click OK . Figure 23-40 Deliver from Stream dialog On the Deliver from Stream Preview dialog (Figure 23-41) make sure the dev2_IntegrationView is selected as the integration view. Click OK . Chapter 23. Using ClearCase 779 Figure 23-41 Deliver from Stream Preview The integration view is now updated with the contents of the development view. In the Deliver from Stream - Merges Complete dialog, deselect Open a ClearCase Explorer window and click OK . On the Delivering to View dialog, click Complete and then Close . Developer 2 makes a new baseline To make a new baseline: As developer 2, select Start -> Programs -> Rational ClearCase LT Client -> Rational ClearCase LT Project Explorer . In the left pane select ITSO_Project_Integration and select Make Baseline from the context menu. In the Make Baseline dialog, change the name of the baseline to ITSO_Project_<date>-2 and click OK . Click OK on the confirmation dialog (1 new baseline was created) and then close the Make Baseline dialog. Close the ClearCase Project Explorer. Developers synchronize Developer 2 has now finished his current task and developer 1 can now catch up with the latest changes made by developer 2: As developer 1, connect to ClearCase Select ClearCase -> Update View . 780 WebSphere Studio Application Developer Version 5 Programming Guide On the Start Update dialog (Figure 23-42) select dev1_IntegrationView and click OK . Figure 23-42 Selecting view to update On the Snapshot View Update dialog (Figure 23-43) select Changed in the left pane. The right pane changes and displays all the changed files. Figure 23-43 Snapshot view update dialog In the right pane select web.xml and select Show Version Tree from its context menu. This displays the Version Tree Browser as shown in Figure 23-44. This window shows the version history for this file. Chapter 23. Using ClearCase 781 Figure 23-44 Version tree browser Close the Version Tree Browser and then close the Snapshot View Update window. Click OK to dismiss the Save Update dialog. The integration view is now updated with the latest changes made to the integration stream. Before developer 1 can continue working his development view needs to be refreshed. Select ClearCase -> Rebase Stream . From the Rebase Stream dialog, select Projects -> ITSO_Project -> ITSO_Project_Integration -> dev1_View and click OK . In the Rebase Stream Preview dialog (Figure 23-45) select the new baseline, ITSO_VOB ITSO_Project_<date>-2, from the baseline drop-down list and make sure the dev1_View is selected as the target view. Click OK . Figure 23-45 Rebase Stream Preview - developer 1 Click OK to dismiss the Hijacked Files Warning dialog. The contents of the integration view is now copied to developer 1’s development view. 782 WebSphere Studio Application Developer Version 5 Programming Guide On the Rebase Stream - Merges Complete dialog, click OK . On the Rebasing in View dialog, click Complete and then click Close . To refresh Application Developer’s view, select the ITSOProGuideCCWeb project and select Refresh from its context menu. The screen should now show both ServletA and ServletB as in Figure 23-46. Figure 23-46 Developer 1 Workbench updated Summary In this chapter we have shown you a very basic scenario with two developers working on a common Web project. One of the developers set up the initial environment, added a servlet, delivered the development stream to the shared integration stream, and made a new baseline. The second developer then joined the project, imported its contents into the own workspace, added a second servlet, delivered the contents to the integration stream, and made a new baseline. Developer 1 then retrieved the latest changes into the workspace. © Copyright IBM Corp. 2003. All rights reserved. 783 Part 6 Appendixes This part of the book includes the following supplementary information: Appendix A, “Product installation” on page 785 Appendix B, “Keyboard shortcuts” on page 801 Appendix C, “Additional material” on page 809 Part 6 . project and click Finish. C:ITSOdev2_ViewITSO_VOBITSOProGuideCCEAR 776 WebSphere Studio Application Developer Version 5 Programming Guide Figure 23-37 Import EAR project Repeat the import. 774 WebSphere Studio Application Developer Version 5 Programming Guide In the Choose Location for Snapshot view (Integration View). otherwise click Change -> Browse and select it. Click OK . 778 WebSphere Studio Application Developer Version 5 Programming Guide Figure 23-39 Rebase Stream Preview The Rebase Stream dialog