來講說dubbo安裝時遇到的大坑。java
以前的資源在阿里的網站上能夠直接下載下來,但這兩天老是沒有mvn install成功過,最初覺得是網絡緣由,但家裏網速槓槓的,依舊不能下載到有些網站的代碼,才意識到這是資源自己的問題。首先會碰到的問題是opensesame這個網站上不去,致使某個依賴沒法下載:node
[ERROR] Non-resolvable parent POM: Could not transfer artifact com.alibaba:opensesame:pom:2.0 from/to opensesame.releases (http://code.alibabatech.com/mvn/releases)
只能到github上手動下載一個opensesame項目,地址:https://github.com/alibaba/opensesame.git,將opensesame下載下來mvn install(根據網上的帖子,2.0和1.0都要安裝一遍)以後,dubbo-parent總算是安裝成功,但以後的項目依舊是skipped,錯誤以下:git
[ERROR] Failed to execute goal on project dubbo-common: Could not resolve dependencies for project com.alibaba:dubbo-common:jar:2.5.3: Failed to collect dependencies for [org.slf4j:slf4j-api:jar:1.6.2 (provided), commons-logging:commons-logging-api:jar:1.1 (provided), log4j:log4j:jar:1.2.1 6 (compile), org.javassist:javassist:jar:3.15.0-GA (compile), com.alibaba:hessian-lite:jar:3.2.1-fixed-2 (compile), com.alibaba:fastjson:jar:1.1. 8 (provided), org.jvnet.sorcerer:sorcerer-javac:jar:0.8 (provided), cglib:cglib-nodep:jar:2.2 (test), junit:junit:jar:4.10 (test), org.easymock:e asymock:jar:3.0 (test), org.easymock:easymockclassextension:jar:3.0 (test), com.googlecode.jmockit:jmockit:jar:0.999.8 (test)]: Failed to read ar tifact descriptor for com.alibaba:fastjson:jar:1.1.8: Could not transfer artifact com.alibaba:fastjson:pom:1.1.8 from/to opensesame.releases (htt p://code.alibabatech.com/mvn/releases): Connection to http://code.alibabatech.com refused: Connection refused: connect -> [Help 1]
不少文件從阿里的倉庫中都找不到了,wtf...github
除了opensesame,還有fastjson依賴包,hessian-lite依賴包都會有各類問題。最後在https://github.com/alibaba/dubbo/issues/21找到了一份最新的依賴包,包含了比較關鍵的幾個依賴,安裝到倉庫再編譯便可以經過啦。(其實也能夠在github上找到對應的項目,下載,安裝...)。spring
到這裏,總算是告一段落。json
若是還須要分別把其中比較獨立的項目運行出來,例如dubbo-admin,那麼還須要作點別的工做。api
進入dubbo-admin目錄,竟然沒有按照預期的出現target,又是個坑,發現pom中依賴的是dubbo-parent-2.4.10,可是明明版本已經到2.4.11了,改了這個版本,又下載了一大堆spring的依賴,編譯成功,出現了target以及相應的war包。修改dubbo.properties中的地址,運行zookeeper,tomcat,輸入http://ip:port/dubbo-admin就能夠訪問到界面。tomcat