中国IT动力,最新最全的IT技术教程
最新100篇 | 推荐100篇 | 专题100篇 | 排行榜 | 搜索 | 在线API文档
首 页 | 程序开发 | 操作系统 | 软件应用 | 图形图象 | 网络应用 | 精文荟萃 | 教育认证 | 硬件维护 | 未整理篇 | 站长教程
ASP JS PHP工程 ASP.NET 网站建设 UML J2EESUN .NET VC VB VFP 网络维护 数据库 DB2 SQL2000 Oracle Mysql
服务器 Win2000 Office C DreamWeaver FireWorks Flash PhotoShop 上网宝典 CorelDraw 协议大全 网络安全 微软认证
硬件维护  CPU  主板  硬盘  内存  显卡  显示器  键盘鼠标  声卡音箱  打印机  机箱电源  BIOS  网卡  C#  Java  Delphi  vs.net2005
  当前位置:> 程序开发 > 编程语言 > Java > 软件工程
team programing wiht cvs in wsad
作者:未知 时间:2005-07-24 21:25 出处:JR 责编:chinaitpower
              摘要:team programing wiht cvs in wsad
 
What This Exercise is About
Developing applications in a team environment is very common in businesses today. Team
Development as it is often referred to, allows multiple developers to simultaneously work on the
same application and in some instances the same source code. WebSphere Studio Application
Developer supports Team Development by providing an interface for Source Control
Management (SCM) software to easily plugin to the Workbench. This exercise will introduce
Team Development in WebSphere Studio Application Developer and feature Concurrent
Versions System (CVS) as the SCM software.
The exercise is quite simple, using only two developers and a few simple files, but the
scenarios could easily be extended to hundreds of different developers working on many
complex files.

关于这部分练习的内容:
由一个小组在特定的环境中开发应用软件在如今的商业贸易中已经是司空见惯。小组开发通常指的是
允许多个开发者同时在同样的应用软件,同样的环境,以及统一的代码下工作。WebSphere Studio Application
Developer为小组开发提供了一个针对代码管理控制(SCM)的界面以便与和工作台进行连接。这个例子将会介绍
在WebSphere Studio Application Developer下的小组开发,以及如何使(CVS)具有SCM软件的特色。
    这个例子非常的简单,仅仅用到了2个开发者和一些简单的文件,但是这些能够很容易地被扩展到成百
上千个不同的开发者在各种复杂的文件下工作的情况。

User Requirement
User must have WebSphere Studio Application Developer installed, as well as the local
Windows implementation of the CVS server. The protocol used to access the CVS repository is
the same one that would be used if the repository was installed on another machine (either
Windows-based or Unix/Linux-based). The YourBank source files for this lab need to be
installed at c:\yourbank\lab7. Two accounts (programmer1 and programmer2) must be created
on the workstation to simulate multiple programmers using the same CVS repository. There is a
file, c:\yourbank\lab7\labsetup.bat, to create these accounts. The user must also have the
YourBank application installed in WebSphere Studio Application Developer.
用户需求:
    用户必须已安装了WebSphere Studio Application Developer,且在本地的windows下执行CVS server。
而且用来连接CVS库的协议必须和安装在其他的机器上的协议(Windows-based or Unix/Linux-based)相同。YourBank
的LAB源文件需要安装在c:\yourbank\lab7。两个账号(程序员1 和 程序员2)必须在工作站被创建以用来模拟多个程序员使用同一个CVS库。有一个名为c:\yourbank\lab7\labsetup.bat的文件可以用来创建这些账号。而且用户也必须在 WebSphere Studio Application Developer 安装了YourBank应用程序。

Note: Unix/Linux based CVS repositories are the recommended platform for robust and stable
(production level) team programming.

注解:基于Unix/Linux CVS库在小组程序开发中是被推荐使用的稳定的功能较强的(指产品等级)平台。

What You Should Be Able to Do
At the end of this lab, you should be able to understand the team programming functions
available in the Workbench. You should also be able to create a repository connection. Finally
you should be able to use the workbench support for repository access and synchronization.
** NOTE ** Solution instructions are at the end of Part Four

你能够做些什么
在这个实验的最后,你就能够明白在工作平台下小组开发的一些有效的方法。你也可以创建一些库的联接。
最后你就可以学会使用支持同步的库存取操作的工作平台了。

2001/12/20 16:46:58 IBM WebSphere Studio Application Developer Workshop - Lab Exercise APPDEVL7.lwp
Page 1 of 21

Introduction
CVS is an Open Source, source control management and version control management
software supporting a repository to store source code as it is developed in a Team
Development environment. You will start by creating the CVS repository and then connecting to
the repository using WebSphere Studio Application Developer. With a connection made to the
CVS repository, you will add the YourBank projects created in the other labs to the repository.
From there, you will use the team programming features to synchronize, release, and version
your code.


介绍:
CVS是一种开放的代码,支持代码控制管理和版本控制管理软件,能够象在小组开发环境下开发一样
使用库来储存源代码。你将从创建CVS库和使用 WebSphere Studio Application Developer 联接库开始学习。
通过联接创建CVS库,你将通过库的其他实验创建添加你的YourBank项目。从那里,你通过小组开发来对你的
代码的同步操作,发布和版本控制都能起到重要的作用。

Exercise Instructions
练习说明:

Part One: Setup CVS on Windows
第一部分:在WINDOWS下安装CVS

__1. The CVS repository must be created first before files can be used in a team
programming environment. Create the CVS repository directory by starting the CVS
Configure Server program clicking Start --> CVS for NT --> Configure Server.

1.CVS库必须在文件能被小组开发环境下使用之前被创建。可以通过启动CVS Configure Server程序来
 创建CVS库:点击Start --> CVS for NT --> Configure Server.
 
__2. In the CVSNT window, click Add.

__2.在CVSNT窗口下,点击Add.
© Copyright IBM Corporation 2001. All rights reserved.
2001/12/20 16:46:58 IBM WebSphere Studio Application Developer Workshop - Lab Exercise APPDEVL7.lwp
Page 2 of 21

__3. In the Enter path to new root field, enter c:\cvsrep. Click OK.
__3.在“输入新的根路径”的窗口中,输入c:\cvsrep. 然后按 OK.

 
__4. When prompted to create the directory, answer Yes.

__4. 在提示是否要创建路径的时候,回答 Yes.

Note: If the directory is already listed in the Configure Server utility, but it does not
actually exist in the file system, you should delete it from the list and re-add it. This will
create the appropriate directory structure in the file system.

注意:如果目录已经存在于Configure Server utility,但并不属于整个文件系统中的时候,你应该
把它从列表中删除,重新添加。这样才能够保证在文件系统中创建正确的目录结构。

__5. Click Start to start the CVS server. The message over the buttons should say
Running.
__5. 点击 Start 启动 CVS server. 在按键上部的信息会显示 Running.
 

__6. Select OK to close the CVSNT window.
__6. 选 OK 来关闭 CVSNT 窗口.

Part Two: Create files for Team Programming
第二部分:为组开发创建文件

__1. You will now use setup WebSphere Studio Application Developer to work with the CVS
repository created in Part One. If it is not already running, start WebSphere Studio
Application Developer (Start --> Program Files --> IBM WebSphere Studio Application
Developer --> IBM WebSphere Studio Application Developer)

__1. 你现在可以通过在第一部分创建的CVS库使用WebSphere Studio Application Developer 工作了。
如果它现在还没有运行,那就先启动WebSphere Studio Application Developer吧,
可以通过(Start --> Program Files --> IBM WebSphere Studio ApplicationDeveloper --> IBM WebSphere 
Studio Application Developer)来启动。

__2. Switch to the Web perspective if it is open or by clicking Perspective --> Open -->
Other... and selecting Web.

__2. 如果已经打开的话,就切换到 Web 视图 :点击 Perspective --> Open -->
Other... 然后选择 Web.

© Copyright IBM Corporation 2001. All rights reserved.


2001/12/20 16:46:58 IBM WebSphere Studio Application Developer Workshop - Lab Exercise APPDEVL7.lwp

Page 3 of 21

You must add some files to a project in your workspace that you and another developer
will change in various ways to simulate the different conflicts that will arise in a real team
programming environment.

你必须在你的工作区中往你的工程中添加一些文件,这样你和其他开发者就可以交换使用
各种不同的方法来模拟现实中的小组开发环境中所遇到的各类冲突和问题了。

__ In the Navigator view, right click on the YourBankWebModule project and click New
--> File --> Other....
__ 在 Navigator 视图中, 在YourBankWebModule 工程上右击, 然后点击 New
--> File --> Other....

__ Select Simple and File.
__ 选择 Simple 和 File.
 
__ Click Next.
__ 点击 Next.

__ YourBankWebModule should be set as the folder. For the File name, enter
ReleaseNotes.txt.

__ YourBankWebModule 将被设置成一个文件夹. 在文件名字中输入
ReleaseNotes.txt.
 
__ Click Finish.
__ 点击 Finish.

__3. In the same manner as above, add a file called DeleteMe.txt to the
YourBankWebModule project.
__3. 使用以上同样的方法, 添加一个名为DeleteMe.txt 的文件到你的
YourBankWebModule 工程中

__4. Open the Resource Perspective by clicking Perspective --> Open --> Other... and
choose Resource from the window. Click OK.
__4. 打开 Resource 视图 :Perspective --> Open --> Other... 
从窗口中选择 Resource. 点击 OK.

© Copyright IBM Corporation 2001. All rights reserved.
2001/12/20 16:46:58 IBM WebSphere Studio Application Developer Workshop - Lab Exercise APPDEVL7.lwp
Page 4 of 21


__5. Add a few lines to the ReleaseNotes.txt file, simulating adding code to a file.
__ Expand the YourBankWebModule project in the Navigator view
__ Open the ReleaseNotes.txt file for editing by double clicking on it.
__ In the editor, enter the following text: (NOTE: To save time copy the contents of
c:\yourbank\lab7\releasenotes.txt)

__5. 添加一些行到你的 ReleaseNotes.txt 文件中, 就像往文件中添加代码一样
__ 在Navigator 视图中 展开 YourBankWebModule 工程
__ 通过双击打开 ReleaseNotes.txt 进入编辑状态。
__ 在编辑器中, 输入以下文字:(注意: 要储存c:\yourbank\lab7\releasenotes.txt的内容)
YourBankWebModule Release Notes
Created in WebSphere Studio Application Developer
Known Bugs:
<none>

__ Save and Close the file.
__ 保存 并且 关闭 文件。

Part Three: Access the repository from the WorkBench
第三部分:通过工作平台联接库
__1. Switch to the Team Perspective to work with the Repository View by clicking
Perspective --> Open --> Team from the Menu.

__1. 通过点击切换到 Team 界面 以便使用库
从菜单中选择 Perspective --> Open --> Team 。

__2. Switch to the Repositories view by selecting the tab or by selecting Perspective -->
Show View --> Repositories.

__2. 通过TAB键切换到库视图,或者可以通过点击:Perspective -->
Show View --> Repositories切换。


__3. In the Repositories view, right click on the open area and select New --> CVS
Repository Location. 
__3. 在库视图下,在开放区域右击,选择 New --> CVS
Repository Location. 

You will need to fill in the connection information.
__ In the User name field, enter programmer1.
__ In the Host name field, enter localhost.
__ In the Repository path field, enter c:\cvsrep.
The CVS location field at the bottom of the window should be automatically computed
based on your input in the other fields.

你需要填写联接条件.
__ 在 User name 中, 输入 programmer1。
__ 在 Host name 中, 输入 localhost。
__ 在 Repository path 中,输入 c:\cvsrep。
在你输入其他的区域的时候,CVS位置区会被自动的计算,并在窗口的底部表示出来。

© Copyright IBM Corporation 2001. All rights reserved.
2001/12/20 16:46:58 IBM WebSphere Studio Application Developer Workshop - Lab Exercise APPDEVL7.lwp
Page 5 of 21
 
__ Click Finish.
__ 点击 Finish。

__ When prompted, enter the password for programmer1 (just4fun).
__ 当出现提示后, 输入开发者1的密码 (just4fun).

 
The processing that follows will attempt to connect to the CVS repository service. Once
the connection processing completes you will see the CVS repository in the Repository
view.

然后它接下去的处理就是试着联接到CVS库服务器。一旦处理完成以后,你就可以在
库的视图中看到CVS库了。

 

You are now ready to use the CVS repository to manage the files in WebSphere Studio
Application Developer.

你现在就可以准备在WebSphere StudioApplication Developer下使用CVS库来进行文件的管理了。

__4. The repository tree expands in two directions, the list of project versions and the list of
streams. Expand Project Versions. Currently no projects exist in the repository, so the

© Copyright IBM Corporation 2001. All rights reserved.
2001/12/20 16:46:58 IBM WebSphere Studio Application Developer Workshop - Lab Exercise APPDEVL7.lwp
Page 6 of 21
tree should be empty.
__4. 库的树形图从2个方向扩展, 工程版本的序列和流的序列。
展开 Project Versions。 通常此时库中没有工程存在,所以树形图将会为空。
 

__5. You will add the projects which store the resources created in the previous labs to the
CVS repository.
__5. 你可以往CVS 库中添加在先前的实验中保存了源代码的工程。

__ In the Navigator View, right click the TestServer project and click Properties.
__ In the Properties dialog, select Team from the list on the left.
__ 在 Navigator 视图中, 右击 TestServer 工程然后点击 Properties。
__ 在 Properties 对话框中,从左面的列表中选择 Team 。

 
__ Click Change to change the stream associated with the project to the CVS repository
stream
__ Since you only connected to one repository, there will be one Repository and one
Stream in the list. Click OK.

__ 点击 Change 来改变和 CVS 库关联的工程。
__ 因为你只联了一个库,在列表中会有一个库和一个流。点击OK.
 

© Copyright IBM Corporation 2001. All rights reserved.
2001/12/20 16:46:58 IBM WebSphere Studio Application Developer Workshop - Lab Exercise APPDEVL7.lwp
Page 7 of 21

__ Click OK to close the Properties window.
__ 点击 OK 关闭 Properties 窗口。

__6. Repeat steps 5 for each of the other projects which were created in the previous labs
(YourBankEAR, YourBankEJBModule, YourBankWebModule).
__6. 重复步骤5来操作先前实验中所创建的工程。
(YourBankEAR, YourBankEJBModule, YourBankWebModule).

__7. In the navigator view, right click on the TestServer project and click Team -->
Synchronize with Stream.
__7. 在 navigator 视图中,右击 TestServer 工程然后点击 Team -->
Synchronize with Stream.
 
This will open the Synchronize view where any conflicts with existing files in repository.
Since this is the first time these files are being added to the repository, there should not
be any conflicts.

同步流
这会打开在库中存在的任何有冲突的文件的Synchronize 视图。
因为这是这些文件第一次被加入到库中,所以不会有任何的冲突。
 

2001/12/20 16:46:58 IBM WebSphere Studio Application Developer Workshop - Lab Exercise APPDEVL7.lwp
Page 8 of 21

__8. To release all of the files in the TestServer project to the CVS repository that you
associated with this project. Right click on the TestServer project in the Synchronize
view, and click Release. This will place the projects in the stream.
 
__ When prompted for a comment, enter Initial Release and click OK. The
Synchronize - Release Mode should be cleared.

__8. 为了发布你联接到这个工程中的所有文件到你的CVS库中的TestServer 工程中。
在Synchronize 视图中右击TestServer 工程,然后按 Release. 这样就能把工程放到流中。
__ 当提示输入注释时,输入 Initial Release 然后点击 OK。Synchronize - Release 模式
将会被清除。

__9. Repeat steps 7 and 8 with each of the other projects to add them to the repository.
__9. 重复步骤 7 和 8 把其他的工程加入到库中。

__10. In the Navigator view, right click on the TestServer you just released to the repository,
and select Team --> Version From Workspace... to version the files in the repository.
__ When prompted to give the version a name, select Automatic.
__ Click OK.

__10. 在Navigator 视图中, 右击你刚发布的TestServer  选择 Team --> Version From Workspace...
 把新的版本加入库中。
__当提示输入版本的名称时, 选择 Automatic.
__ 点击 OK.
 

You could specify your own version number or provide a version name for each
resource individually.

你也可以为每个个别的代码指定版本好,或是版本的名称。

© Copyright IBM Corporation 2001. All rights reserved.
2001/12/20 16:46:58 IBM WebSphere Studio Application Developer Workshop - Lab Exercise APPDEVL7.lwp
Page 9 of 21

In the repositories view, you should now be able to see all of the projects that you added
along with the version numbers that were automatically chosen (you may have to select
refresh from the buttons at the top of the view to see them).

在 repositories 视图中,你应该现在可以看到所有你一起添加的具有自动选择的版本号的工程。
 (你可以通过按视图顶部的 refresh 按键来看)。

__11. Repeat step 10 for the other projects added to the repository. After versioning all of your
projects explore the Repositories tree in the view. Notice how a version number has
been attached to every resource. Each of these versions can be used as a starting
point by other developers. Also notice that Server configurations and instances can be
versioned along with other resource files.
__11.重复步骤10把其他的工程加入到库中。在把你所有的工程都编好版本以后,察看视图中的
库的树形图。注意一下版本号是如何附加到每个代码上的。这些版本号中的每一个都可以作为
其他开发者的起点进行工作。也要注意服务器的构造和境况也能够连同其他的代码一样被编成
版本。
 
Part Four: Work with team programming support
第四部分: 在支持组开发情况下工作

In this part of the exercise, you will simulate two developers working on the files created in Part
One of this lab. As one of the developers, you will modify and delete files in the workbench.
The other developer is a command file that you will run in the DOS shell which will issue CVS
command, and modify and add files to the repository.
The project structure and file content are very simple, but the implications, concerning how
team-programming works, are valid.

在这部分的练习中,你将会模拟2个开发者同时在实验一创建的文件下工作。作为第一个开发者
你将会在平台下进行修改和删除文件的操作。作为另外的一个开发者,你将在DOS shell下运行
命令文件,并且修改并把它加入到库中。
工程的结构和文件的内容非常简单,但是关于如何进行组开发的含义则是非常有用和重要的。
__1. Modify project content in the workbench as Programmer 1.
__1. 作为开发者1,在平台下修改工程的内容。

__ In the Resource perspective of the Workbench, expand the YourBankWebModule
project and open the file ReleaseNotes.txt.
__ 在平台下的Resource视图中,展开YourBankWebModule工程,打开ReleaseNotes.txt.
文件。

__ After the Created in WebSphere Studio Application Developer line, add the line
Created by <your name> where <your name> is any name you like.
The file should now look like:

__ 在 Created in WebSphere Studio Application Developer 行后面,加上
Created by <your name>,<your name>可以按个人爱好填。
文件现在就会变成:

YourBankWebModule Release Notes
Created in WebSphere Studio Application Developer
Created by <yourname>
Known Bugs:
<none>

© Copyright IBM Corporation 2001. All rights reserved.
2001/12/20 16:46:58 IBM WebSphere Studio Application Developer Workshop - Lab Exercise APPDEVL7.lwp
Page 10 of 21
__ Save and Close the file.
__ 保存并关闭文件。 

__2. Add a new file to YourBankWebModule project, either in the root or in a folder. Choose
any name (except Readme.txt).
__2. 在 YourBankWebModule 工程中加入新的文件,位置在根或是文件夹中。任意取一个名字
(Readme.txt 除外)。

__3. Delete the file DeleteMe.txt in the YourBankWebModule project.
__3. 删除在YourBankWebModule 工程中的 DeleteMe.txt 文件。

__4. Now you will simulate another developer making changes simultaneously to the
changes that you’ve just made. From a DOS window run the file
c:\yourbank\lab7\Programmer2.bat.

__4. 现在你可以同时地模拟另外的一个开发者对文件进行刚才的那些改变。
从dos窗口运行文件
c:\yourbank\lab7\Programmer2.bat.

This will represent another programmer checking out the YourBankWebModule that you
added to the CVS repository, making some changes, and checking the files back in.
这就象征着另外的开发者在check out 你加到CVS库里的 YourBankWebModule ,并且
作了一些修改再把文件 Check in 回去。

__ When prompted for the CVS password for programmer2, enter head4sea.
__当提示输入开发者2的CVS密码的时候,输入 head4sea。
__ Wait to enter a y at the prompt at the end of the command.
__ 等到最后显示提示信息的时候按y。 

__5. Refresh the repository view (the chasing double arrow in the right corner of the view) to
see the end result of the bat-file command (programmer 2 activity).
There are now two versions of the YourBankWebModule project in the repository, one
created by you (programmer1) and added to the repository earlier in lab (v1) and one
created by the Programmer2.bat command file (v2).
The HEAD stream also displays the new content added by the Programmer2.bat
commands, such as a new Readme.txt file, and changes to the ReleaseNotes.txt file.
Open these files to view the differences.

__5. 刷新 repository 视图 (在视图的右下角有个双箭头) 观察bat文件命令的最后结果
 (开发者2是激活的状态)。现在在库里中有2个 YourBankWebModule 工程的版本。
一个是你(作为开发者1)创建并且较早地添加到库里的那个(版本1);另外一个是
作为开发者2通过Programmer2.bat创建的(版本2)。
[HEAD]流显示了通过Programmer2.bat 命令追加的新的内容,比如说新的Readme.txt file 和
ReleaseNotes.txt file的变化。可以打开这些文件来观察他们的区别。
 

© Copyright IBM Corporation 2001. All rights reserved.
2001/12/20 16:46:58 IBM WebSphere Studio Application Developer Workshop - Lab Exercise APPDEVL7.lwp
Page 11 of 21

 
Note: The changes that you (as programmer 1) have made to the ReleaseNotes.txt file
will not yet be reflected in the file in the stream, since those changes only currently exist
in your local copy of the file.

注意:你(作为开发者1)所作的ReleaseNotes.txt 文件并不能反映到文件流中,因此这些
改变目前只是存在于你本地的文件副本中。

__6. Now it is time for you (acting as programmer 1 again) to catch up to these changes and
share those changes you made (the deletion of DeleteMe.txt, the addition of another file
and the ReleaseNotes.txt update).
__6. 现在是你(再次作为开发者1)把这些变化共享和提出的时候了(DeleteMe.txt的删除
部分和其他增加的文件以及改变后的ReleaseNotes.txt文件)。

__ Synchronize the project with the Stream by right clicking the YourBankWebModule
entry in the Navigator view and clicking Team --> Synchronize with Stream. This will
run a comparison between your working copy in the Workspace with the copy of the
project in the associated team stream in the CVS repository.
Once the compare is complete, the Workbench user interface will show you the
differences between the two file sets both graphically and in the status area (the
Structure Compare view is show using the Catch Up/Release Mode).
The color-coded arrow icons show you the type of update you can process (the compare
is just a report). The arrow direction defines the direction of the change:

__ 使用流来同步工程 可以通过右击YourBankWebModule 进入到Navigator 视图, 
点击Team --> Synchronize with Stream.这样会在你的平台下的工作副本和CVS库中
的组流的联合副本之间运行一个比较操作。一旦比较结束以后,工作台的用户界面会在
状态区域显示关于这2个文件区别的图。 (结构比较的视图是用Catch Up/Release 模式
来表示的)。有着颜色标志的箭头图标显示了你进行的是那种类型的更新操作。(比较的
结果只不过是一个报表),箭头的方向表示了改变的趋势。
 

© Copyright IBM Corporation 2001. All rights reserved.
2001/12/20 16:46:58 IBM WebSphere Studio Application Developer Workshop - Lab Exercise APPDEVL7.lwp
Page 12 of 21

-> To the repository
<- From the repository
<-> Conflict

-> 进库
<- 出库
<-> 冲突

The arrow icon content determines the type of change:
箭头的内容表示了修改的种类

Empty An update
+ A new file
- A file being removed

空 一个更新
+ 一个新文件
- 一个被删除的文件

__7. Use the Repository view icons to change what is displayed in the Synchronize - Catch
__7. 使用 Repository 视图图标来改变Synchronize ? Catch里显示的内容。
 

Up/Release Mode.
Up/Release 模式.

The icons, from left to right are:
图标从左到右分别是:

Catch Up mode - files existing in the stream and not in local project
Catch Up 方式- 文件存在于流不存在于本地工程

Release mode - files existing in the local project and not in the stream
Release 方式-文件存在于本地工程不存在于流

Catch Up/Release mode - both above modes displayed
Catch Up/Release方式 ? 以上2种模式显示

Show only conflicts (a toggle) - conflict in files between local project and Stream
Show only conflicts (一个绳针) ? 在本地工程和流中存在的文件冲突。



__ Select the icons and see how the display changes. When done, deselect the Show
__ 选择图标观察显示的变化,做完以后,取消选定 Show

only conflicts toggle and choose the Catch Up/Release Mode option.
You can also select entries in the Structure Compare tree and see a comparison of the
workspace/repository file content in the Text Compare area of the view.
only conflicts 绳针和选择 Catch Up/Release Mode 选项。
你也能在结构比较树形图中选择并在视图中的Text Compare 区域workspace/repository
看到文件的比较。
 
© Copyright IBM Corporation 2001. All rights reserved.
2001/12/20 16:46:58 IBM WebSphere Studio Application Developer Workshop - Lab Exercise APPDEVL7.lwp
Page 13 of 21

__8. The next step is to choose a strategy for integration changes in the stream with changes
in your code in your local project. One good first step is to make the easy changes
(where there are no conflicts). To do this you will need to catch up those files in the
stream that do not conflict with changes in your local project and you will need to release
files in your local project that do not conflict with files in the stream.

__8. 接下来要做的一步是选择一个方法通过改变你本地的工程的代码来做综合改变。一个好的
开始步骤是先做一个简单的变化(没有冲突),要做到这个你需要在流中掌握这些文件,不会
因为你的本地的改变而产生冲突,并且你需要发布的文件也不会和流起冲突。

__ In the Synchronize - Catch Up/Release Mode view right click on the
YourBankWebModule entry and click Catch Up.
__ 在Synchronize - Catch Up/Release 模式视图中 右击
YourBankWebModule 进入,点击Catch Up.

__ In the message box, Catch up Over Conflicts? click No. This leaves any conflicts
between files in the stream and files in your local project to be merged later.
__ 在 message box中, Catch up Over Conflicts? 点击 No. 这可能会导致以后流中的文件
和你本地工程中的文件结合时会起冲突。


__ Right click YourBankWebModule again and click Release.
__ 再次右击 YourBankWebModule 后点击 Release.

__ In the message box, Release Conflicts? click No. This leaves any conflicts between
files in your local project files and files in the stream to be merged later.
__ 在 message box中, Release Conflicts? click No. 这可能会导致以后流中的文件
和你本地工程中的文件结合时会起冲突。

__ When prompted to add a comment for the release, enter Code Enhanced.
__ 当提示输入一个release注释的时候,输入 Code Enhanced.

__9. Select the DeleteMe.txt file from the Synchronize - Catch Up/Release Mode view and
issue a Release request (by right clicking on the file and selecting Release from the
context menu).
__9. 从Synchronize - Catch Up/Release 模式视图中选择 DeleteMe.txt 文件,发出个
Release 请求 (通过在文件上右击并在菜单上选择Release).

__ Click Yes at the conflict prompt (you want to send the delete).
__在提示冲突的时候点击 Yes (你想要发送delete)。

__10. __ When prompted to add a comment, enter File deleted.
__10. __ 当提示加入注释的时候, 输入 File deleted.

© Copyright IBM Corporation 2001. All rights reserved.
2001/12/20 16:46:58 IBM WebSphere Studio Application Developer Workshop - Lab Exercise APPDEVL7.lwp
Page 14 of 21

__11. Select the ReleaseNotes.txt entry in the tree. You will see the text compare of your
changes and those made by the other programmer.
__11. 选择目录树中 ReleaseNotes.txt 。你就会看见你和其他开发者所作的文本修改比较。
 
© Copyright IBM Corporation 2001. All rights reserved.
2001/12/20 16:46:58 IBM WebSphere Studio Application Developer Workshop - Lab Exercise APPDEVL7.lwp
Page 15 of 21
__ If you choose the ancestor visibility icon, you will get a three way compare.
__ 如果你选择 ancestor visibility 图标, 你就能得到三种比较方式。
 
__ You can use the other icons to review the changes (the up/down arrows) and to help
modify the contents of your working copy.
__ 你可以使用其它的图标来回顾一下变化 (上/下键头) 并能帮助修改你工作副本中的内容。
 

__ Let your mouse rest above the icons to see the hover help for each. Use the
up/down arrows until the new list of Known Bugs that Programmer 2 added in the file on
the right is selected.
__ 就让你的鼠标在图标上休息一下看看每个的帮助吧。使用上/下箭头直到右面有开发者2加到
新的列表中的bug 为止。

© Copyright IBM Corporation 2001. All rights reserved.
2001/12/20 16:46:58 IBM WebSphere Studio Application Developer Workshop - Lab Exercise APPDEVL7.lwp
Page 16 of 21
 
__ Use the Copy current change from Right to Left icon to selectively accept a
change made by the other programmer.
__ 使用 Copy current change from Right to Left 图标来选择性的接收
一些其他开发者所作的改变。
 
© Copyright IBM Corporation 2001. All rights reserved.
2001/12/20 16:46:58 IBM WebSphere Studio Application Developer Workshop - Lab Exercise APPDEVL7.lwp
Page 17 of 21

__ Right click the Workspace file on the left and select Save.
The merge of the differences causes the Workspace file and the Repository file to be
the same. The Synchronize - Catch Up Mode window should be empty.
__ 右击左面工作区的文件并选择 Save.
合并了差异使得工作区的文件和库文件变得相同。Synchronize - Catch Up 模式窗口将会变空。
 
© Copyright IBM Corporation 2001. All rights reserved.
2001/12/20 16:46:58 IBM WebSphere Studio Application Developer Workshop - Lab Exercise APPDEVL7.lwp
Page 18 of 21




__12. Right click ReleaseNotes.txt entry in the Navigator view and click Team --> Show in
Resource History to see the change history for the file. Notice how it lists the
programmer how made the change as well as the comment the programmer made
when releasing the file to the stream.
__12. 右击 ReleaseNotes.txt 进入 Navigator 视图点击 Team --> Show in
Resource History 看文件的变更记录。注意现在它列出的开发者如何改变文件的记录
就如同开发者在流中发布文件时作的注释一样。

__13. You can also right click ReleaseNotes.txt and click Compare With --> Version… to
study the differences between to two versions.
The Compare With -> Local History… option can be valuable as well.
__13. 你也可以右击ReleaseNotes.txt 点击 Compare With --> Version… 来研究和比较
2个版本的不同点。
Compare With -> Local History… 选项也同样非常有用。
 
__14. Switch to the Repositories view. Expand Streams and HEAD and right click
YourBankWebModule. Click Version from Stream… to version the files in the
stream. (You can also do this from the Navigator view Team --> Version from
Stream…)
__14. 切换到 Repositories 视图。展开流和HEAD并右击YourBankWebModule。
点击 Version from Stream… 来对流中的文件制订版本。
 (你也可以通过Navigator 视图 Team --> Version from Stream…)来做。

__15. Except the Automatic version name and click OK.
__15. 不用 Automatic 作为版本名, 点击 OK.

__16. In the Repositories view expand the Project Versions and YourBankWebModule. (You
may have to refresh the repository view (the chasing double arrow in the right corner of
the view) ). Notice there are now three versions listed in the CVS repository.
__16. 在 Repositories 视图中展开工程版本和YourBankWebModule。(你可以通过刷新repository 视图 (视图右下角的双箭头))。注意那里列出了在CVS库中的3个版本。
© Copyright IBM Corporation 2001. All rights reserved.
2001/12/20 16:46:58 IBM WebSphere Studio Application Developer Workshop - Lab Exercise APPDEVL7.lwp
Page 19 of 21
 
What you did in this exercise
In this exercise, you created a CVS repository. You created a connection to the repository from
WebSphere Studio Application Developer. Next, you added the projects from the YourBank
application to the stream and then created & versioned each project from the stream contents.
Then you simulated team programming by making changes to files from within the Workbench
as one programmer and then as another programmer, modifying files and releasing changes to
the stream from outside the Workbench. You finished the exercise by merging the changes in
the stream with the files in your Workbench project.
在这个练习中你所做的:
在这个练习中,你创建了 CVS 库。 你通过WebSphere Studio Application Developer 建立了
一个库的联接。接下来,你通过 YourBank 应用程序追加了一些工程到流中,而且为每一个工程
都创建了内容以及制订了版本。然后你通过一个人先后作为2个程序开发者在平台上修改文件以及
从工作平台外部改变文件的操作来模拟组开发的过程。最后完成了在工作平台中合并经过各种修
改过的工程文件的练习。

Study the following to learn more:
The team programming support is well documented in the Workbench help system. You
should review this documentation. For more on CVS visit these web sites:

通过下面的学习来获得更多:
支持队联合编程在工作台帮助系统中有很好的文档记录。你应该多学习这
部分的内容。关于更多的CVS信息请访问下列网站:

www.cvshome.org
www.cvsnt.org

© Copyright IBM Corporation 2001. All rights reserved.
2001/12/20 16:46:58 IBM WebSphere Studio Application Developer Workshop - Lab Exercise APPDEVL7.lwp
Page 20 of 21

Solution Files:
解答文件:
To run this lab without having run the previous labs:
运行这个实验时不要运行以前的实验

1) Run the file C:\yourbank\solutions\lab1\CfgLab1.bat
(type in into a DOS window or double-click on it.)
This will open a DB2CMD window and execute cfgdb.bat
1) 运行 C:\yourbank\solutions\lab1\CfgLab1.bat文件
(在 DOS 窗口中输入或双击)
将会打开一个 DB2CMD 窗口,执行cfgdb.bat

2) Import the Server Configurations
a) File->New->Project... Server, Server Project, click Next
b) Enter the project name TestServer, click Finish.
c) File->Import. Select Zip file, click Next
d) Browse to C:\YourBank\Solutions\Lab1\TestServers.zip
e) Enter "TestServer" as your Folder name
f) Click "Finish"
2) 输入服务器的配置
a) File->New->Project... Server, Server Project, 点击 Next
b) Enter the project name TestServer, 点击Finish.
c) File->Import. Select Zip file, 点击Next
d) 浏览 C:\YourBank\Solutions\Lab1\TestServers.zip
e) 输入 "TestServer" 作为你的目录名
f) 点击"Finish"







3) Import the EAR in Application Developer:
a) File->Import
b) Select EAR file, click NEXT
c) Browse to c:\YourBank\Solutions\Lab6\yourBankAfterLab6.ear
d) Enter the Enterprise Application Project name as YourBankEAR
e) click "Finish"
3) 输入EAR 应用程序的开发者中
a) File->Import
b) 选择 EAR 文件, 点击NEXT
c) 浏览 c:\YourBank\Solutions\Lab6\yourBankAfterLab6.ear
d) 输入 Enterprise Application Project name as YourBankEAR
e) 点击"Finish"

4) Right-click on YourBankWebModule in the Navigator view. Select Properties,
Server Preferences, YourBankServer, click Apply, then OK.
4) 在Navigator视图中右击 YourBankWebModule 。选择 Properties,
Server Preferences, YourBankServer, 点击 Apply, 然后按 OK.

5) Right-click on YourBankWebServicesModule in the Navigator view. Select Properties,
Server Preferences, YourBankServer, click Apply, then OK.
5) 在Navigator视图中右击 YourBankWebServicesModule 。选择 Properties,
Server Preferences, YourBankServer, 点击Apply, 然后按OK.
© Copyright IBM Corporation 2001. All rights reserved.
2001/12/20 16:46:58 IBM WebSphere Studio Application Developer Workshop - Lab Exercise APPDEVL7.lwp
Page 21 of 21 end by feizhonghai 2002-6-6

关闭本页
 
首页 | 投资与合作 | 服务条款 | 隐私政策 | 收藏本站 | 设为首页 | 新用户注册 | 免责声明 | 使用帮助
Copyright ©2005-2008 chinaitpower.com All rights reserved. www.chinaitpower.com 版权所有