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>