dubbo2.4.11 Source Code Compilation

Source: Internet
Author: User

This article compiles and packages examples with dubbo2.4.11 source code

Dubbo Official Website: http://dubbo.io/

Source: Https://github.com/alibaba/dubbo

User guide: http://dubbo.io/User+Guide-zh.htm

Development Guide: http://dubbo.io/Developer+Guide-zh.htm


According to official description 2.4.X is a stable version of GA, go to https://github.com/alibaba/dubbo/releases download the latest 2.4.11

Unzip to D:\project\dubbo\dubbo-dubbo-2.4.11

Before compiling the Dubbo, perform the following actions

1, opensesame dependency problem, may be reported non-resolvable parent pom:could not transfer artifact com.alibaba:opensesame:pom:2.0 From/to opensesame.releases (http://code.alibabatech.com/mvn/releases)

The error.

Open https://github.com/alibaba/opensesame, download opensesame (mostly Pom.xml file), unzip the D:\project\dubbo\opensesame-master directory

In the D:\project\dubbo\opensesame-master directory, the cmd command line executes

MVN Clean Install-dmaven.test.skip

After compiling, modify D:\project\dubbo\opensesame-master\pom.xml, change version 2.0 to 1.0,

<groupId>com.alibaba</groupId> <artifactId>opensesame</artifactId><!--2.0 modified to 1.0-- > <version>1.0</version> <packaging>pom</packaging>

Compile the same directory once again Opensesame

MVN Clean Install-dmaven.test.skip


2, Fastjson dependency package, may report [ERROR] Failed to execute goal on project Dubbo-common:could not resolve dependencies for Proje CT com.alibaba:dubbo-common:jar:2.5.4-snapshot:could not find artifact com.alibaba:fastjson:jar:1.1.8 in ibiblio.org ( HTTP://MIRRORS.IBIBLIO.ORG/PUB/MIRRORS/MAVEN2) [Help 1] Error

Modify D:\project\dubbo\dubbo-dubbo-2.4.11\pom.xml, find <fastjson_version>1.1.8</fastjson_version> Modify 1.1.8 to 1.1.39, reference HTTPS://GITHUB.COM/ALIBABA/DUBBO/ISSUES/22


3, note D:\project\dubbo\dubbo-dubbo-2.4.11\pom.xml below the content

<repositories><repository><id>opensesame.releases</id><url>http:// Code.alibabatech.com/mvn/releases</url><releases><enabled>true</enabled></releases ><snapshots><enabled>false</enabled></snapshots></repository></ Repositories>


4, Hessian-lite dependency package, unable to find resource ' com.alibaba:hessian-lite:jar:3.2.1-fixed-2 ' in repository Central.repo (http://repo1.maven.org/maven2)

Download Hessian-lite from GitHub's Dubbo Main Library, the current Dubbo source has hessian-lite source code, can be removed directly to add to Dubbo 2.4.11 compilation (https://github.com/ Alibaba/dubbo,https://github.com/alibaba/dubbo/tree/master/hessian-lite)

Copy the Hessian-lite to the D:\project\dubbo\dubbo-dubbo-2.4.11,

Modify D:\project\dubbo\dubbo-dubbo-2.4.11\pom.xml, add <module>hessian-lite</module> Compile

<modules> <!--increase hessian-lite--> <module>hessian-lite</module><module>dubbo-common& lt;/module><module>dubbo-container</module><module>dubbo-remoting</module>< module>dubbo-rpc</module><module>dubbo-filter</module><module>dubbo-cluster</ Module><module>dubbo-registry</module><module>dubbo-monitor</module><module> Dubbo-config</module><module>dubbo</module></modules>

Modify D:\project\dubbo\dubbo-2.4.11\hessian-lite\pom.xml

<parent> <groupId>com.alibaba</groupId> <artifactId>dubbo-parent</artifactId> <!--<version>2.5.4-SNAPSHOT</version> Change the version number to 2.4.11, which needs to match the current Dubbo version number--><version>2.4.11 </version> </parent>


5, increase the compilation Dubbo Management Console, this step is not necessary, mainly the official Dubbo Management console can not download, directly compiled a, the default does not compile packaging dubbo-admin, need to increase their own.

Modify the D:\project\dubbo\dubbo-2.4.11\dubbo-admin\pom.xml file to change the version number to 2.4.11

<parent><groupid>com.alibaba</groupid><artifactid>dubbo-parent</artifactid><! --The <version>2.4.10</version> version number is modified to 2.4.11--><version>2.4.11</version></parent>

Modify D:\project\dubbo\dubbo-dubbo-2.4.11\pom.xml, add <module>dubbo-admin</module> Compile

<modules> <module>hessian-lite</module><module>dubbo-common</module><module >dubbo-container</module><module>dubbo-remoting</module><module>dubbo-rpc</ Module><module>dubbo-filter</module><module>dubbo-cluster</module><module> Dubbo-registry</module><module>dubbo-monitor</module><module>dubbo-config</module ><module>dubbo</module><!--Add compile dubbo-admin Management console, Dubbo-simple, Dubbo-demo can decide whether to compile-->< Module>dubbo-admin</module></modules>


6, formally compiled Dubbo

1) cmd command line, execute command in D:\project\dubbo\dubbo-dubbo-2.4.11 directory:

Set MAVEN memory first, or you will report an out-of-memory error at compile time

Set MAVEN_OPTS=-XMX1024M-XX:MAXPERMSIZE=512MMVN clean Install-dmaven.test.skip


7. Add Eclipse Support

Execute the command in the D:\project\dubbo\dubbo-dubbo-2.4.11 directory:

MVN Eclipse:eclipse

You can run the following programs directly in Eclipse

Dubbo-demo-provider/src/test/java/com.alibaba.dubbo.demo.provider.demoprovider

Dubbo-demo-consumer/src/test/java/com.alibaba.dubbo.demo.consumer.democonsumer

Dubbo-monitor-simple/src/test/java/com.alibaba.dubbo.monitor.simple.simplemonitor

Dubbo-registry-simple/src/test/java/com.alibaba.dubbo.registry.simple.simpleregistry


8, dubbo-admin Management Console installation

After the 6th step is completed, the D:\project\dubbo\dubbo-2.4.11\dubbo-admin\target directory generates Dubbo-admin-2.4.11.war,

The war packet is extracted to the Webapps/root directory, modified Web-inf\dubbo.properties,

dubbo.registry.address=zookeeper://127.0.0.1:2181dubbo.admin.root.password=rootdubbo.admin.guest.password= Guest

Dubbo.properties Configuring Zookeeper's registry address (zookeeper installation configuration ignored)

Note: Make sure that zookeeper starts before you start Tomcat.



dubbo2.4.11 Source Code Compilation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.