WebSphere Studio Application Developer Version 5 Programming Guide part 80 pps

10 104 0
WebSphere Studio Application Developer Version 5 Programming Guide part 80 pps

Đang tải... (xem toàn văn)

Thông tin tài liệu

764 WebSphere Studio Application Developer Version 5 Programming Guide Figure 23-17 Specifying an activity  Select the ITSOProGuideCCWeb project and add this to source control using the same method (do not create a new activity, use the activity created when adding the EAR project to source control).  Both projects are now under ClearCase source control and their contents has been moved from the Application Developer workspace (C:\WSAD5sg246957 in our example) to C:\ITSO\dev1_View\ITSO_VOB.  In Figure 23-18 you can see that the icons for the resources now have blue background. This means that the resources are under ClearCase source control. Figure 23-18 Resources under ClearCase source control Chapter 23. Using ClearCase 765 Development scenario To show how to work with ClearCase we use a simple scenario where two developers work sequentially on a common project. Developer 1 adds a servlet Developer 1 defines a servlet in the Web project:  As developer 1, select File -> New -> Servlet . Enter itso.cc as the package name and enter ServletA as the class name. Click Next . Make sure that Add to web.xml is selected and click Finish .  On the Check Out Elements dialog (Figure 23-19) make sure all three files are selected as shown and click OK . Figure 23-19 Specifying elements to check out  On the Select Activity, select New and enter Developer 1 adds ServletA as the name for the activity. Click OK twice. The servlet is generated.  On the Add Element(s) to Source Control dialog, make sure the packages and servlet are selected as shown in Figure 23-20. Deselect Keep checked out and click OK . 766 WebSphere Studio Application Developer Version 5 Programming Guide Figure 23-20 Adding new elements to source control  On the Select Activity dialog, select Developer 1 adds ServletA and click OK . The servlet is added to the project and to ClearCase source control.  Click Ye s on the File Changed dialog.  As we only want to show how to work with ClearCase, we do not need to add any real code to the servlet so simply enter 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 deselected the Keep checked out option). The dialog shown in Figure 23-21 is displayed asking you to check out the servlet. Click OK . Figure 23-21 Check out elements Chapter 23. Using ClearCase 767  On the Select Activity dialog, select Developer 1 adds ServletA 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.ServletA and the Web Content\WEB-INF\web.xml and select Team -> Check in from the context menu.  On the Check in Elements dialog (Figure 23-22) make sure both elements are selected and then click OK . The green check marks of the resources icons are removed indicating that the files are no longer checked out. Figure 23-22 Checking in elements  Before we can deliver the project to the stream, the ibm-web-bnd.xml and ibm-web.ext.xmi files must 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 Tea m - > Undo Check Out from the context menu. On the Undo Check Out for element(s) dialog, make sure both files are selected and then click OK .  Before delivering to the stream, it is good practice to make sure that nothing is checked out. Select ClearCase -> Show Project Checkouts . On the Find Criteria dialog (Figure 23-23) click Browse and select the C:\ITSO\dev1_View\ITSO_VOB directory. Keep the other defaults as shown and click OK . 768 WebSphere Studio Application Developer Version 5 Programming Guide Figure 23-23 Finding checkouts  No checked out files should be found. Click OK to dismiss the dialog and then close the Find Checkouts window. Developer 1 delivers work to the integration stream To deliver the work into the integration stream:  Select ClearCase -> Deliver Stream . On the Deliver from Stream dialog (Figure 23-24) select the development stream dev1_View and click OK . Figure 23-24 Delivering to Integration Stream Chapter 23. Using ClearCase 769  In the Deliver from Stream Preview dialog (Figure 23-25) make sure both activities are selected and that the view to deliver to is dev1_IntegrationView . Click OK . Figure 23-25 Deliver from Stream Preview dialog  After a while the Deliver from Stream - Merges Complete dialog (Figure 23-26) is shown. Deselect Open a ClearCase Explorer and click OK . Figure 23-26 Deliver from Stream - Merges Complete dialog  On the Delivering to View dialog (Figure 23-27) click Complete . 770 WebSphere Studio Application Developer Version 5 Programming Guide Figure 23-27 Delivering to View dialog  Optionally you can click Details to see a list of the files delivered (Figure 23-28), then click Close . Figure 23-28 Showing files delivered Developer 1 makes a baseline To make a baseline:  As developer 1, select Start -> Programs -> Rational ClearCase LT Server -> Rational ClearCase LT Project Explorer . Chapter 23. Using ClearCase 771  In the left pane select ITSO_Project_Integration and select Make Baseline from the context menu (Figure 23-29). Figure 23-29 Make baseline  In the Make Baseline dialog (Figure 23-30) click OK . Figure 23-30 Make baseline settings  Click OK on the confirmation dialog (1 new baseline was created) and then close the Make Baseline dialog.  You can now close the ClearCase Project Explorer. Developer 1 has now finished his current task and developer 2 will now join the project and add a servlet. 772 WebSphere Studio Application Developer Version 5 Programming Guide Developer 2 joins the project Developer 2 now joins the ClearCase project and adds it to his Application Developers workspace.  As developer 2, select ClearCase -> Connect to Rational ClearCase in Application Developer.  Create a new view by selecting ClearCase -> Create New View . In the View Creation Wizard dialog (Figure 23-31) select Ye s and select the ITSO_Project and click Next . Figure 23-31 View Creation View - Choose a Project  In the Create a Development Stream dialog (Figure 23-32) enter dev2_View as the name of the development stream and make sure that ITSO_Project_Integration is selected as the integration stream. Click Next . Chapter 23. Using ClearCase 773 Figure 23-32 Creating a development stream for developer 2  In the Choose Location for a Snapshot View (Development View) dialog (Figure 23-33) enter C:\ITSO\dev2_View as the path for the new development view and click Next . Figure 23-33 Select location for development view . Explorer. Developer 1 has now finished his current task and developer 2 will now join the project and add a servlet. 772 WebSphere Studio Application Developer Version 5 Programming Guide Developer. click OK . 766 WebSphere Studio Application Developer Version 5 Programming Guide Figure 23-20 Adding new elements to source control  On the Select Activity dialog, select Developer 1 adds. 764 WebSphere Studio Application Developer Version 5 Programming Guide Figure 23-17 Specifying an activity  Select the ITSOProGuideCCWeb project and add this to

Ngày đăng: 03/07/2014, 20:20

Tài liệu cùng người dùng

Tài liệu liên quan