1、本人电脑环境配置git
1.操做系统:windows 10 ,8G内存程序员
2.开发环境:jdk1.8.0_101,eclipse-neon(自带Git),maven(配置maven就不在这里介绍),Tomcat 7.0.73github
3.获取前提:你得有一个GitHub帐号,(没有帐号也能够,为了专业,程序员必需要有GitHub帐号:))windows
2、从GitHub获取dubbo源码网络
GitHub源码地址:https://github.com/alibaba/dubbo,打开eclipse,在Project Explorer面板的空白处右键,选择Import...菜单项,如图:eclipse
在接下来弹出的选择面板中,选择Git而后点next按钮,以下图:maven
当到资源获取方式时,选择Clone URI,点击下一步,把https://github.com/alibaba/dubbo.git,填写进去,会出现以下效果:this
GitHub上的url:url
eclipse效果图:操作系统
填写User和Password点击Next会出现
接下来的步骤基本比较简单,再也不累述,一直点Next 知道把源码项目下载下来,点Finish。
2、从本地Git仓库中导入源码
一样在eclipse的Project Explorer面板的空白处右键,选择Import...菜单项,这时选择Maven中的Exising Maven Projects,如图:
、
点击Next按钮进入下一个面板,选择你的git存储路径,以下图:
接下来就简单的操做Next按钮知道Finish。
这些操做完后,eclipse就会出现你导入的dubbo项目,这里的dubbo工程是2.5.6版本,导入成功后就等到maven进行编译:
3、碰到的问题
建议你们操做前,要本身搭建maven环境,不要用eclipse自带的maven,并找到setting.xml文件改成阿里私服库的配置,这样获取jar包网络比较有保障,配置内容以下:
<mirrors> <!-- mirror | Specifies a repository mirror site to use instead of a given repository. The repository that | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used | for inheritance and direct lookup purposes, and must be unique across the set of mirrors. | <mirror> <id>mirrorId</id> <mirrorOf>repositoryId</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://my.repository.com/repo/path</url> </mirror> --> <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors>