【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
![](https://img-blog.csdn.net/20151012143156869?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
2.在Add Repository中填写如下内容:
svn
http://subclipse.tigris.org/update_1.10.x
然后点击ok按钮,即可进行svn插件的自动更新。
![](https://img-blog.csdn.net/20151012142506699?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
3.显示Subclipse和SVNKit两个插件内容,选中,点击Next
![](https://img-blog.csdn.net/20151012143209502?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
4.选择Next
![](https://img-blog.csdn.net/20151012143217269?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
5.选择I accept 并选择finish按钮
![](https://img-blog.csdn.net/20151012143331824?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
6.等待安装
![](https://img-blog.csdn.net/20151012143342582?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
7.有警告,直接选择OK就可以了。
![](https://img-blog.csdn.net/20151012144540547?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
8.出现如下界面后,选择Yes,即可自动重启MyEclipse。
![](https://img-blog.csdn.net/20151012143422663?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
9.打开MyEclipse菜单Windows下面的Preferences,如果Team下面显示SVN,则插件安装成功!
![](https://img-blog.csdn.net/20151012143436516?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
三.建立项目
右击项目,选择Import,选择从SVN检出项目。
四.将项目共享到SVN资源库服务器
1.选择Window--Show View--Other
![](https://img-blog.csdn.net/20151012145056401?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
2.选择SVN资源库研究
![](https://img-blog.csdn.net/20151012144846073?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
3.下面的视图中,显示SVN资源库,右击检出为,就可以检出资源库中的代码了。
![](https://img-blog.csdn.net/20151012145222802?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
![](https://img-blog.csdn.net/20151012144858995?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
一.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--Other2.选择SVN资源库研究
3.下面的视图中,显示SVN资源库,右击检出为,就可以检出资源库中的代码了。
五.总结
.NET和Java的SVN的安装和配置几乎相同,不同的是插件不同,Java多了一个SVN资源库的概念。相关文章推荐
- Java简易计算器程序设计
- Spring研究笔记------事务探究
- Thrift在Java中的简单实例(二)
- Java从入门到精通08-二进制、位运算、移位运算
- unable to load default svn client 和 Eclipse SVN 插件与TortoiseSVN对应关系
- Struts2中访问ServletAPI
- Thrift在 Java中的简单实例(-)
- 框架培训-第二日
- Struts2整合EasyUi中的DataGird
- [JavaWeb基础] 021.Action中result的各种转发类型
- Java编程基础
- JAVA 访问控制修饰符
- java+js实现完整的图片展示本地目录demo
- Java学习总结--json
- Java基本数据类型
- 模拟Spring的简单实现
- 零成本实现接口自动化测试 – Java+TestNG 测试Restful service
- Eclipse中的Hovers 配置解析
- Java从入门到精通07-排序
- 开启Eclipse 智能感知代码功能