hadoop环境配置之编译(三)--win10 编译下 hadoop-eclipse-plugin-2.7.7

我使用的是hadoop-2.7.7,由于自学一切都的自己来,这次是编译一个eclipse 插件为hadoop测试用
编译环境:
JDK配置 ;
安装Eclipse (最新的eclipse 有一定问题 我这用的分享给大家链接:https://pan.baidu.com/s/128JqQc8nqRC1YI6hm6xk9A 密码:g51c )
安装ant 参考:https://www.cnblogs.com/huangchanghuan/p/6597741.html 安装包(链接:https://pan.baidu.com/s/1XlGTl2tvzeSUI6wrt0ZsKw 密码:v0q4)
下载hadoop二进制包(hadoop-2.7.7.tar.gz)我这是用自己在win下编译的https://download.csdn.net/download/qq_32961893/10720328 官网下载的hadoop-2.7.7.tar.gz未测试
下载 hadoop2x-eclipse-plugin-master 官网地址:https://github.com/winghc/hadoop2x-eclipse-plugin
我用的版本链接:https://pan.baidu.com/s/10BUxbKW2WzM14PJlnc5FpQ 密码:sa71
编译:运行CMD,切换到XX\hadoop2x-eclipse-plugin-master\src\contrib\eclipse-plugin
也可以在XX\hadoop2x-eclipse-plugin-master\src\contrib\eclipse-plugin目录下按住shift+鼠标右键在此处打开命令窗口
执行编译,命令如下:
ant jar -Dversion=2.7.7 -Dhadoop.version=2.7.7 -Declipse.home=D:\eclipse -Dhadoop.home=E:\hadoop\hadoop-2.7.7
Dversion=Dhadoop.version --要编译的hadoop版本
Declipse.home=D:\eclipse eclipse所在位置
Dhadoop.home=E:\hadoop\hadoop-2.7.7 解压hadoop源码位置
执行等待一个漫长的过程
可能报错缺包体之类的
你可以看XX\hadoop2x-eclipse-plugin-master\src\contrib\eclipse-plugin下的build.xml文件修改配置配置
hadoop环境配置之编译(三)--win10 编译下 hadoop-eclipse-plugin-2.7.7_第1张图片
hadoop环境配置之编译(三)--win10 编译下 hadoop-eclipse-plugin-2.7.7_第2张图片
这些地方去E:\hadoop\hadoop-2.7.7\share\hadoop\common\lib中去找对应jar包修改build.xml配置我最重修改的build.xml
黏贴出来:`

  
  
 

      
       
      









  












  







` 接着修改 hadoop2x-eclipse-plugin-master/ivy/libraries.properties #hadoop.version=2.6.0 modify hadoop.version=2.7.7 #commons-collections.version=3.2.1 modify commons-collections.version=3.2.2 #commons-httpclient.version=3.0.1 modify commons-httpclient.version=3.1 #commons-logging.version=1.0.4 modify commons-logging.version=1.1.3 #commons-logging-api.version=1.0.4 modify commons-logging-api.version=1.1.3 #commons-math.version=2.1 modify commons-math.version=3.1.1 #commons-io.version=2.1 modify commons-io.version=2.4 #hsqldb.version=1.8.0.10 modify hsqldb.version=2.0.0 #htrace.version=3.0.4 modify htrace.version=3.1.0 jets3t.version=0.6.1 modify jets3t.version=0.9.0 #jersey-core.version=1.8 modify #jersey-json.version=1.8 modify #jersey-server.version=1.8 modify jersey-core.version=1.9 jersey-json.version=1.9 jersey-server.version=1.9 #junit.version=4.5 modify junit.version=4.11 #slf4j-api.version=1.7.5 modify #slf4j-log4j12.version=1.7.5 modify slf4j-api.version=1.7.10 slf4j-log4j12.version=1.7.10 #xerces.version=1.4.4 modify xerces.version=2.9.1 我修改过后的全部文件
#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.

#This properties file lists the versions of the various artifacts used by hadoop and components.
#It drives ivy and the generation of a maven POM

# This is the version of hadoop we are generating
hadoop.version=2.7.7
hadoop-gpl-compression.version=0.1.0

#These are the versions of our dependencies (in alphabetical order)
apacheant.version=1.7.0
ant-task.version=2.0.10

asm.version=3.2
aspectj.version=1.6.5
aspectj.version=1.6.11

checkstyle.version=4.2

commons-cli.version=1.2
commons-codec.version=1.4
commons-collections.version=3.2.2
commons-configuration.version=1.6
commons-daemon.version=1.0.13
commons-httpclient.version=3.1
commons-lang.version=2.6
commons-logging.version=1.1.3
commons-logging-api.version=1.1.3
commons-math.version=3.1.1
commons-el.version=1.0
commons-fileupload.version=1.2
commons-io.version=2.4
commons-net.version=3.1
core.version=3.1.1
coreplugin.version=1.3.2

hsqldb.version=2.0.0
htrace.version=3.1.0

ivy.version=2.1.0

jasper.version=5.5.12
jackson.version=1.9.13
#not able to figureout the version of jsp & jsp-api version to get it resolved throught ivy
# but still declared here as we are going to have a local copy from the lib folder
jsp.version=2.1
jsp-api.version=5.5.12
jsp-api-2.1.version=6.1.14
jsp-2.1.version=6.1.14
jets3t.version=0.9.1
jetty.version=6.1.26
jetty-util.version=6.1.26
jersey-core.version=1.9
jersey-json.version=1.9
jersey-server.version=1.9
junit.version=4.11
jdeb.version=0.8
jdiff.version=1.0.9
json.version=1.0

kfs.version=0.1

log4j.version=1.2.17
lucene-core.version=2.3.1

mockito-all.version=1.8.5
jsch.version=0.1.42

oro.version=2.0.8

rats-lib.version=0.5.1

servlet.version=4.0.6
servlet-api.version=2.5
slf4j-api.version=1.7.10
slf4j-log4j12.version=1.7.10

wagon-http.version=1.0-beta-2
xmlenc.version=0.52
xerces.version=2.9.1

protobuf.version=2.5.0
guava.version=11.0.2
netty.version=3.6.2.Final

最后编译出来的结果在E:\hadoop\hadoop2x-eclipse-plugin-master\build\contrib\eclipse-plugin中,将hadoop-eclipse-plugin-2.7.7.jar拷贝到eclipse的D:\eclipse\plugins中即可使用

你可能感兴趣的:(hadoop,hadoop学习)