2、安装m4
3、安装autoconf
4、安装automake
5、安装libtool
6、安装ant
vi /etc/profile
export ANT_HOME=%ANT%
export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH
source /etc/profile
7、安装eclipse
8、解压Hadoop文件,并修改配置文件
取消ivy-download
%hadoop%/src/contrib/build-contrib.xml
添加hadoop的version和eclipse的eclipse.home属性
编辑%HADOOP_HOME%/build.xml
修改hadoop版本号
取消ivy-download
%hadoop%/src/contrib/eclipse-plugin/build.xml
取消ivy-download:
添加将要打包到plugin中的第三方jar包列表
修改%hadoop%/src/contrib/eclipse-plugin/META-INF/MANIFEST.MF
修改${HADOOP_HOME}/src/contrib/eclipse-plugin/META-INF/MANIFEST.MF的Bundle-ClassPath:
Bundle-ClassPath: classes/,
lib/hadoop-core.jar,
lib/commons-cli-1.2.jar,
lib/commons-configuration-1.6.jar,
lib/commons-httpclient-3.0.1.jar,
lib/commons-lang-2.4.jar,
lib/jackson-core-asl-1.8.8.jar,
lib/jackson-mapper-asl-1.8.8.jar
9、执行ANT (编译源代码)
进入到%hadoop%/执行ant compile
10、进入到%hadoop%/src/contrib/eclipse-plugin/执行 ant jar (生成elipse插件)
参考http://blog.csdn.net/wind520/article/details/9384249