您的位置:首页 > 编程语言 > Java开发

【Eclipse】--MyEclipse2014项目共享至SVN资源库

2015-10-12 14:58 477 查看
  开始进入Java旅程有些时日了,代码备份和共享也是十分重要的,下面给大家介绍一下MyEclipse2014如何进行项目共享至SVN资源库。

一.SVN服务器的版本和部署

1.SVN分为服务器端和客户端

 服务器端:VisualSVN-Server-2.5.9.msi

 客户端:TortoiseSVN-1.7.12.24070-x64-svn-1.7.9.msi

 插件:Eclipse自带插件

2.SVN服务器端部署步骤:

   1).下载安装,傻瓜式安装,很简单

   2).安装完毕之后,创建资源库(Repository),将来存放所有项目资源的仓库,命令如下(cmd下执行)

     svnadmin create d:\SVNRepo\Repo1

     Repo1就为创建的资源库

   3).资源库创建完毕之后,找到D:\SVNRepo\Repo1\conf\svnserve.conf文件打开,修改

     修改之前为:

     [general]

     ### These options control access to the repository for unauthenticated

     ### and authenticated users.  Valid values are "write", "read",

     ### and "none".  The sample settings below are the defaults.

     # anon-access = read

     # auth-access = write

     ### The password-db option controls the location of the password

     

     ### Uncomment the line below to use the default password file.

     # password-db = passwd

     ### The authz-db option controls the location of the authorization

     修改之后为:

     [general]

     ### These options control access to the repository for unauthenticated

     ### and authenticated users.  Valid values are "write", "read",

     ### and "none".  The sample settings below are the defaults.

     anon-access = read

     auth-access = write

     ### The password-db option controls the location of the password

 

     ### Uncomment the line below to use the default password file.

     password-db = passwd

     ### The authz-db option controls the location of the authorization

 

     注意:anon-access = read

          auth-access = write

          password-db = passwd,每行的前面不能有空格

   4).创建用户,配置访问权限

找到D:\SVNRepo\Repo1\conf\passwd,添加用户及密码,建完之后,该用户就可以向资源库中提交项目,添加用户wm,密码wm

     [users]

     # harry = harryssecret

     # sally = sallyssecret

     wm = wm

   5).启动SVN服务器

     svnserve -d -r D:\SVNRepo\Repo1

 

二.MyEclipse2014插件的安装

1.选择MyEclipse的菜单 Help--Installfrom Site,得到Install窗口,如下图。点击Add按钮,弹出Add Repository对话框。



2.在Add Repository中填写如下内容:

svn
http://subclipse.tigris.org/update_1.10.x
然后点击ok按钮,即可进行svn插件的自动更新。



3.显示Subclipse和SVNKit两个插件内容,选中,点击Next



4.选择Next



5.选择I accept 并选择finish按钮



6.等待安装



7.有警告,直接选择OK就可以了。



8.出现如下界面后,选择Yes,即可自动重启MyEclipse。



9.打开MyEclipse菜单Windows下面的Preferences,如果Team下面显示SVN,则插件安装成功!



三.建立项目

右击项目,选择Import,选择从SVN检出项目。




四.将项目共享到SVN资源库服务器

 1.选择Window--Show View--Other



2.选择SVN资源库研究



3.下面的视图中,显示SVN资源库,右击检出为,就可以检出资源库中的代码了。





五.总结

.NET和Java的SVN的安装和配置几乎相同,不同的是插件不同,Java多了一个SVN资源库的概念。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: