1.源码托管地址 https://github.com/alibaba/dubbo
2.环境:macOS Sierra 10.12.4
eclipse-jee-oxygen-M3-macosx-cocoa-x86_64.tar.gz
Apache Maven 3.3.9
git version 2.11.0 (Apple Git-81)
3.使用git命令下载dubbo源码
soondeMacBook-Pro:workspace soon$ pwd
/Users/soon/Documents/work/program/dubbo/workspace
soondeMacBook-Pro:workspace soon$ git clone https://github.com/alibaba/dubbo.git dubbo
Cloning into 'dubbo'...
remote: Counting objects: 43974, done.
remote: Total 43974 (delta 0), reused 0 (delta 0), pack-reused 43974
Receiving objects: 100% (43974/43974), 6.34 MiB | 528.00 KiB/s, done.
Resolving deltas: 100% (15280/15280), done.
soondeMacBook-Pro:workspace soon$
soondeMacBook-Pro:workspace soon$ ll
total 0
drwxr-xr-x 25 soon staff 850B 4 6 10:13 dubbo
drwxr-xr-x 3 soon staff 102B 4 6 10:10 ..
drwxr-xr-x 3 soon staff 102B 4 6 10:13 .
soondeMacBook-Pro:workspace soon$ ll dubbo/
total 104
-rw-r--r-- 1 soon staff 17K 4 6 10:13 pom.xml
drwxr-xr-x 4 soon staff 136B 4 6 10:13 hessian-lite
drwxr-xr-x 7 soon staff 238B 4 6 10:13 dubbo-test
drwxr-xr-x 5 soon staff 170B 4 6 10:13 dubbo-simple
drwxr-xr-x 13 soon staff 442B 4 6 10:13 dubbo-rpc
drwxr-xr-x 10 soon staff 340B 4 6 10:13 dubbo-remoting
drwxr-xr-x 8 soon staff 272B 4 6 10:13 dubbo-registry
drwxr-xr-x 5 soon staff 170B 4 6 10:13 dubbo-monitor
drwxr-xr-x 3 soon staff 102B 4 6 10:13 dubbo-maven
drwxr-xr-x 5 soon staff 170B 4 6 10:13 dubbo-filter
drwxr-xr-x 6 soon staff 204B 4 6 10:13 dubbo-demo
drwxr-xr-x 8 soon staff 272B 4 6 10:13 dubbo-container
drwxr-xr-x 5 soon staff 170B 4 6 10:13 dubbo-config
drwxr-xr-x 4 soon staff 136B 4 6 10:13 dubbo-common
drwxr-xr-x 4 soon staff 136B 4 6 10:13 dubbo-cluster
drwxr-xr-x 4 soon staff 136B 4 6 10:13 dubbo-admin
drwxr-xr-x 4 soon staff 136B 4 6 10:13 dubbo
-rw-r--r-- 1 soon staff 5.4K 4 6 10:13 README.md
-rw-r--r-- 1 soon staff 3.9K 4 6 10:13 NOTICE
-rw-r--r-- 1 soon staff 11K 4 6 10:13 LICENSE
-rw-r--r-- 1 soon staff 113B 4 6 10:13 .travis.yml
-rw-r--r-- 1 soon staff 233B 4 6 10:13 .gitignore
drwxr-xr-x 13 soon staff 442B 4 6 10:13 .git
drwxr-xr-x 3 soon staff 102B 4 6 10:13 ..
drwxr-xr-x 25 soon staff 850B 4 6 10:13 .
soondeMacBook-Pro:workspace soon$ cd dubbo/
soondeMacBook-Pro:dubbo soon$ git checkout master
4.导入dubbo源码到eclipse工程
第一步:执行命令mvn eclipse:eclipse
soondeMacBook-Pro:workspace soon$ pwd
/Users/soon/Documents/work/program/dubbo/workspace
soondeMacBook-Pro:workspace soon$ cd dubbo/
soondeMacBook-Pro:dubbo soon$ mvn eclipse:eclipse
[INFO] Scanning for projects...
[WARNING]
…直到
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.047 s
[INFO] Finished at: 2017-04-06T10:42:39+08:00
[INFO] Final Memory: 35M/702M
[INFO] ------------------------------------------------------------------------
第二步:导入eclipse(不导入不影响编译)
Paste_Image.png
选择源码目录,然后select all,然后Finish
5.maven构建
soondeMacBook-Pro:dubbo soon$ pwd
/Users/soon/Documents/work/program/dubbo/workspace/dubbo
soondeMacBook-Pro:dubbo soon$ mvn clean install -Dmaven.test.skip
[INFO] Scanning for projects...
[WARNING]
…直到
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26.036 s
[INFO] Finished at: 2017-04-06T11:47:32+08:00
[INFO] Final Memory: 69M/1015M
[INFO] ------------------------------------------------------------------------
soondeMacBook-Pro:dubbo soon$ ll dubbo/target/
total 3208
-rw-r--r-- 1 soon staff 3.6K 4 6 11:47 original-dubbo-2.5.4-SNAPSHOT.jar
drwxr-xr-x 3 soon staff 102B 4 6 11:47 maven-archiver
-rw-r--r-- 1 soon staff 1.4M 4 6 11:47 dubbo-2.5.4-SNAPSHOT.jar
-rw-r--r-- 1 soon staff 174K 4 6 11:47 dubbo-2.5.4-SNAPSHOT-sources.jar
-rw-r--r-- 1 soon staff 12K 4 6 11:47 dependency-reduced-pom.xml
drwxr-xr-x 7 soon staff 238B 4 6 11:47 ..
drwxr-xr-x 7 soon staff 238B 4 6 11:47 .
soondeMacBook-Pro:dubbo soon$ ll dubbo-demo/dubbo-demo-provider/target/
total 35352
drwxr-xr-x 3 soon staff 102B 4 6 11:47 maven-status
drwxr-xr-x 3 soon staff 102B 4 6 11:47 maven-archiver
-rw-r--r-- 1 soon staff 5.2K 4 6 11:47 dubbo-demo-provider-2.5.4-SNAPSHOT.jar
-rw-r--r-- 1 soon staff 17M 4 6 11:47 dubbo-demo-provider-2.5.4-SNAPSHOT-assembly.tar.gz
drwxr-xr-x 3 soon staff 102B 4 6 11:47 dubbo
drwxr-xr-x 3 soon staff 102B 4 6 11:47 dependency-maven-plugin-markers
drwxr-xr-x 4 soon staff 136B 4 6 11:47 classes
drwxr-xr-x 2 soon staff 68B 4 6 11:47 archive-tmp
drwxr-xr-x 8 soon staff 272B 4 6 11:47 ..
drwxr-xr-x 10 soon staff 340B 4 6 11:47 .
soondeMacBook-Pro:dubbo soon$ ll dubbo-demo/dubbo-demo-consumer/target/
total 35352
drwxr-xr-x 3 soon staff 102B 4 6 11:47 maven-status
drwxr-xr-x 3 soon staff 102B 4 6 11:47 maven-archiver
-rw-r--r-- 1 soon staff 6.0K 4 6 11:47 dubbo-demo-consumer-2.5.4-SNAPSHOT.jar
-rw-r--r-- 1 soon staff 17M 4 6 11:47 dubbo-demo-consumer-2.5.4-SNAPSHOT-assembly.tar.gz
drwxr-xr-x 3 soon staff 102B 4 6 11:47 dubbo
drwxr-xr-x 3 soon staff 102B 4 6 11:47 dependency-maven-plugin-markers
drwxr-xr-x 4 soon staff 136B 4 6 11:47 classes
drwxr-xr-x 2 soon staff 68B 4 6 11:47 archive-tmp
drwxr-xr-x 8 soon staff 272B 4 6 11:47 ..
drwxr-xr-x 10 soon staff 340B 4 6 11:47 .
soondeMacBook-Pro:dubbo soon$ ll dubbo-simple/dubbo-monitor-simple/target/
total 38992
drwxr-xr-x 3 soon staff 102B 4 6 11:47 maven-status
drwxr-xr-x 3 soon staff 102B 4 6 11:47 maven-archiver
-rw-r--r-- 1 soon staff 43K 4 6 11:47 dubbo-monitor-simple-2.5.4-SNAPSHOT.jar
-rw-r--r-- 1 soon staff 19M 4 6 11:47 dubbo-monitor-simple-2.5.4-SNAPSHOT-assembly.tar.gz
drwxr-xr-x 3 soon staff 102B 4 6 11:47 dubbo
drwxr-xr-x 3 soon staff 102B 4 6 11:47 dependency-maven-plugin-markers
drwxr-xr-x 4 soon staff 136B 4 6 11:47 classes
drwxr-xr-x 2 soon staff 68B 4 6 11:47 archive-tmp
drwxr-xr-x 8 soon staff 272B 4 6 11:47 ..
drwxr-xr-x 10 soon staff 340B 4 6 11:47 .
网友评论