文档章节

Dubbo-2.4.11的艰辛编译笔记

ColaCode
 ColaCode
发布于 2017/03/26 23:20
字数 1139
阅读 159
收藏 0

准备工作:

0.按官方说明2.4.X是GA稳定版本,去https://github.com/alibaba/dubbo/releases下载最新的2.4.11。并解压缩。

1.准备一个VPN工具,这里推荐蓝灯。

2.找到Maven的settings.xml配置文件,具体方法如下:

例如我的settings.xml路径为:/usr/local/Cellar/maven/3.3.3/libexec/conf

3.将settings.xml中的mirrors注释掉,这里说明一下,因为使用蓝灯VPN就没有必要通过国内的镜像来下载jar包,如果使用国内镜像笔者遇到很多jar下载为空。

开始编译:

1. 进入dubbo-dubbo-2.4.11目录

2. 输入mvn clean install -Dmaven.test.skip

3. 会遇到如下错误,笔者依次给出每个错误的解决方法。

 

[ERROR] Failed to execute goal on project dubbo-common: Could not resolve dependencies for project com.alibaba:dubbo-common:jar:2.4.11: Failed to collect dependencies at com.alibaba:fastjson:jar:1.1.8: Failed to read artifact descriptor for com.alibaba:fastjson:jar:1.1.8: Could not transfer artifact com.alibaba:fastjson:pom:1.1.8 from/to opensesame.releases (http://code.alibabatech.com/mvn/releases): Connect to code.alibabatech.com:80 [code.alibabatech.com/119.38.217.15] failed: Connection refused -> [Help 1]

 

 

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project dubbo-common: Compilation failure

[ERROR] Failure executing javac, but could not parse the error:

[ERROR] 错误: 读取/Users/Enli/.m2/repository/org/slf4j/slf4j-api/1.6.2/slf4j-api-1.6.2.jar时出错; error in opening zip file

[ERROR] 错误: 读取/Users/Enli/.m2/repository/log4j/log4j/1.2.16/log4j-1.2.16.jar时出错; error in opening zip file

[ERROR] 错误: 读取/Users/Enli/.m2/repository/org/javassist/javassist/3.15.0-GA/javassist-3.15.0-GA.jar时出错; error in opening zip file

[ERROR] 3 个错误

 

 

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project dubbo-container-api: Compilation failure

[ERROR] Failure executing javac, but could not parse the error:

[ERROR] 错误: 读取/Users/Enli/.m2/repository/org/mortbay/jetty/jetty/6.1.26/jetty-6.1.26.jar时出错; error in opening zip file

[ERROR] 错误: 读取/Users/Enli/.m2/repository/org/springframework/spring/2.5.6.SEC03/spring-2.5.6.SEC03.jar时出错; error in opening zip file

[ERROR] 2 个错误

 

 

[ERROR] Failure executing javac, but could not parse the error:

[ERROR] 错误: 读取/Users/Enli/.m2/repository/ch/qos/logback/logback-classic/1.0.6/logback-classic-1.0.6.jar时出错; error in opening zip file

[ERROR] 1 个错误

 

 

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project dubbo-remoting-netty: Compilation failure

[ERROR] Failure executing javac, but could not parse the error:

[ERROR] 错误: 读取/Users/Enli/.m2/repository/org/jboss/netty/netty/3.2.5.Final/netty-3.2.5.Final.jar时出错; error in opening zip file

[ERROR] 1 个错误

 

 

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project dubbo-remoting-zookeeper: Compilation failure: Compilation failure:

[ERROR] /Users/Enli/Projects/github/alibaba/dubbo/dubbo-dubbo-2.4.11/dubbo-remoting/dubbo-remoting-zookeeper/src/main/java/com/alibaba/dubbo/remoting/zookeeper/curator/CuratorZookeeperClient.java:[21,32] 错误: 程序包com.netflix.curator.retry不存在

[ERROR] /Users/Enli/Projects/github/alibaba/dubbo/dubbo-dubbo-2.4.11/dubbo-remoting/dubbo-remoting-zookeeper/src/main/java/com/alibaba/dubbo/remoting/zookeeper/curator/CuratorZookeeperClient.java:[32,28] 错误: 找不到符号

[ERROR] 类 CuratorZookeeperClient

[ERROR] /Users/Enli/Projects/github/alibaba/dubbo/dubbo-dubbo-2.4.11/dubbo-remoting/dubbo-remoting-zookeeper/src/main/java/com/alibaba/dubbo/remoting/zookeeper/curator/CuratorZookeeperClient.java:[94,34] 错误: 无法访问CuratorZookeeperClient

[ERROR] -> [Help 1]

/Users/Enli/Projects/github/alibaba/dubbo/dubbo-dubbo-2.4.11/pom.xml中添加黄框的依赖

/Users/Enli/Projects/github/alibaba/dubbo/dubbo-dubbo-2.4.11/dubbo-remoting/dubbo-remoting-zookeeper/pom.xml中添加黄框的依赖

 

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project dubbo-rpc-hessian: Compilation failure: Compilation failure:

[ERROR] /Users/Enli/Projects/github/alibaba/dubbo/dubbo-dubbo-2.4.11/dubbo-rpc/dubbo-rpc-hessian/src/main/java/com/alibaba/dubbo/rpc/protocol/hessian/HttpClientConnectionFactory.java:[23,29] 错误: 程序包org.apache.http.params不存在

[ERROR] /Users/Enli/Projects/github/alibaba/dubbo/dubbo-dubbo-2.4.11/dubbo-rpc/dubbo-rpc-hessian/src/main/java/com/alibaba/dubbo/rpc/protocol/hessian/HttpClientConnection.java:[24,22] 错误: 找不到符号

[ERROR] 程序包 org.apache.http

[ERROR] /Users/Enli/Projects/github/alibaba/dubbo/dubbo-dubbo-2.4.11/dubbo-rpc/dubbo-rpc-hessian/src/main/java/com/alibaba/dubbo/rpc/protocol/hessian/HttpClientConnection.java:[27,29] 错误: 程序包org.apache.http.entity不存在

[ERROR] /Users/Enli/Projects/github/alibaba/dubbo/dubbo-dubbo-2.4.11/dubbo-rpc/dubbo-rpc-hessian/src/main/java/com/alibaba/dubbo/rpc/protocol/hessian/HttpClientConnection.java:[28,30] 错误: 程序包org.apache.http.message不存在

[ERROR] /Users/Enli/Projects/github/alibaba/dubbo/dubbo-dubbo-2.4.11/dubbo-rpc/dubbo-rpc-hessian/src/main/java/com/alibaba/dubbo/rpc/protocol/hessian/HttpClientConnection.java:[45,21] 错误: 找不到符号

[ERROR] 类 HttpClientConnection

[ERROR] /Users/Enli/Projects/github/alibaba/dubbo/dubbo-dubbo-2.4.11/dubbo-rpc/dubbo-rpc-hessian/src/main/java/com/alibaba/dubbo/rpc/protocol/hessian/HttpClientConnectionFactory.java:[39,70] 错误: 无法访问HttpParams

[ERROR] 找不到org.apache.http.params.HttpParams的类文件

[ERROR] /Users/Enli/Projects/github/alibaba/dubbo/dubbo-dubbo-2.4.11/dubbo-rpc/dubbo-rpc-hessian/src/main/java/com/alibaba/dubbo/rpc/protocol/hessian/HttpClientConnectionFactory.java:[39,8] 错误: 找不到符号

[ERROR] 类 HttpClientConnectionFactory

[ERROR] /Users/Enli/Projects/github/alibaba/dubbo/dubbo-dubbo-2.4.11/dubbo-rpc/dubbo-rpc-hessian/src/main/java/com/alibaba/dubbo/rpc/protocol/hessian/HttpClientConnectionFactory.java:[40,8] 错误: 找不到符号

[ERROR] 类 HttpClientConnectionFactory

[ERROR] /Users/Enli/Projects/github/alibaba/dubbo/dubbo-dubbo-2.4.11/dubbo-rpc/dubbo-rpc-hessian/src/main/java/com/alibaba/dubbo/rpc/protocol/hessian/HttpClientConnection.java:[54,30] 错误: 找不到符号

[ERROR] 类 HttpClientConnection

[ERROR] /Users/Enli/Projects/github/alibaba/dubbo/dubbo-dubbo-2.4.11/dubbo-rpc/dubbo-rpc-hessian/src/main/java/com/alibaba/dubbo/rpc/protocol/hessian/HttpClientConnection.java:[54,15] 错误: 无法访问AbstractHttpMessage

[ERROR] 找不到org.apache.http.message.AbstractHttpMessage的类文件

[ERROR] /Users/Enli/Projects/github/alibaba/dubbo/dubbo-dubbo-2.4.11/dubbo-rpc/dubbo-rpc-hessian/src/main/java/com/alibaba/dubbo/rpc/protocol/hessian/HttpClientConnection.java:[62,30] 错误: 找不到符号

[ERROR] 类 HttpClientConnection

[ERROR] /Users/Enli/Projects/github/alibaba/dubbo/dubbo-dubbo-2.4.11/dubbo-rpc/dubbo-rpc-hessian/src/main/java/com/alibaba/dubbo/rpc/protocol/hessian/HttpClientConnection.java:[80,20] 错误: 二元运算符 '!=' 的操作数类型错误

[ERROR] -> [Help 1]

/Users/Enli/Projects/github/alibaba/dubbo/dubbo-dubbo-2.4.11/pom.xml中添加黄框的依赖

/Users/Enli/Projects/github/alibaba/dubbo/dubbo-dubbo-2.4.11/dubbo-rpc/dubbo-rpc-hessian/pom.xml中添加黄框的依赖

最后编译成功

© 著作权归作者所有

ColaCode
粉丝 0
博文 1
码字总数 1139
作品 0
杭州
私信 提问
dubbo2.4.11源码编译

本文以dubbo2.4.11源码编译和打包例 dubbo官网:http://dubbo.io/ 源码:https://github.com/alibaba/dubbo 用户指南:http://dubbo.io/User+Guide-zh.htm 开发指南:http://dubbo.io/Devel......

penngo
2015/08/20
6.9K
0
dubbo源码编译

本文以dubbo2.4.11源码编译和打包例 dubbo官网:http://dubbo.io/ 源码:https://github.com/alibaba/dubbo 用户指南:http://dubbo.io/User+Guide-zh.htm 开发指南:http://dubbo.io/Devel......

x163麦芽糖
2016/06/16
228
0
dubbo源码2.4.11编译失败

@penngo 你好,想跟你请教个问题:你好,dubbo源码编译的时候,找不到curator-client-1.1.10,我用其他版本的curator,编译的时候报错,编译不通过,请问你有1.1.10版本的curator-client包吗?...

zhengcs
2016/11/23
265
2
bubbo消费者连接zookeeper获取服务时connection timed out

提供者放置到zookeeper注册中心后用消费者去获取链接,结果报了个connection timed out还有报了一个 org.springframework.beans.factory.BeanCreationException异常,如下。请大神帮帮忙,三...

ooppoo
2016/11/20
832
1
LSD SLAM的编译以及depth debug window不存在的问题

在回顾LSD SLAM的过程中,想着再跑跑LSD,结果笔记本上面的源码不能重新编译了,所以就重新过了一遍,给后面对SLAM感兴趣的人一点点参考。 首先需要提醒一下的,因为ros版本的升级,编译方式...

osgoodwu
2018/04/11
0
0

没有更多内容

加载失败,请刷新页面

加载更多

golang-字符串-地址分析

demo package mainimport "fmt"func main() {str := "map.baidu.com"fmt.Println(&str, str)str = str[0:5]fmt.Println(&str, str)str = "abc"fmt.Println(&s......

李琼涛
今天
4
0
Spring Boot WebFlux 增删改查完整实战 demo

03:WebFlux Web CRUD 实践 前言 上一篇基于功能性端点去创建一个简单服务,实现了 Hello 。这一篇用 Spring Boot WebFlux 的注解控制层技术创建一个 CRUD WebFlux 应用,让开发更方便。这里...

泥瓦匠BYSocket
今天
6
0
从0开始学FreeRTOS-(列表与列表项)-3

FreeRTOS列表&列表项的源码解读 第一次看列表与列表项的时候,感觉很像是链表,虽然我自己的链表也不太会,但是就是感觉很像。 在FreeRTOS中,列表与列表项使用得非常多,是FreeRTOS的一个数...

杰杰1号
今天
8
0
Java反射

Java 反射 反射是框架设计的灵魂(使用的前提条件:必须先得到代表的字节码的 Class,Class 类 用于表示.class 文件(字节码)) 一、反射的概述 定义:JAVA 反射机制是在运行状态中,对于任...

zzz1122334
今天
6
0
聊聊nacos的LocalConfigInfoProcessor

序 本文主要研究一下nacos的LocalConfigInfoProcessor LocalConfigInfoProcessor nacos-1.1.3/client/src/main/java/com/alibaba/nacos/client/config/impl/LocalConfigInfoProcessor.java p......

go4it
昨天
9
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部