首页 » hadoop » 正文

hadoop2x-eclipse-plugin编译过程

1.下载插件:hadoop2x-eclipse-plugin
2.因为工程目录及插件目录都不一样,因此,先说明一下本地的目录结构:
    eclipse目录: /home/hadoop/software/eclipse
    hadoop2x-eclipse-plugin目录:/home/hadoop/software/hadoop2x-eclipse-plugin/src/contrib/eclipse-plugin/
3.利用Ant进行编译,前提是java环境、ant环境、eclipse及hadoop2.2都已经配置安装完成:
[hadoop@localhost ~]$ cd software/hadoop2x-eclipse-plugin/src/contrib/eclipse-plugin/
[hadoop@localhost eclipse-plugin]$ ant jar -Dversion=2.2.0 -Declipse.home=/home/hadoop/software/eclipse  -Dhadoop.home=/home/hadoop/hadoop
ant编译时的参数说明:
  -Declipse.home:指eclipse的根路径
  -Dhadoop.home:指hadoop2.2.0的根路径
 
4.编译
   [jar] Building jar: /home/hadoop/software/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/hadoop-eclipse-plugin-2.2.0.jar
BUILD SUCCESSFUL
Total time: 5 minutes 43 seconds
最后,可以在相应的目录下找到已经编译成功的插件jar包

发表评论