a. 在hadoop解压目录下,找到src\contrib\eclipse-plugin\build.xml,增加如下几行: <filesetdir="${hadoop.root}"> <includename="hadoop*.jar"/> </fileset>
b. 在build.xml增加如下: <property name="version"value="1.2.1"/>
c. 在build.xml,修改如下: <copy file="${hadoop.root}/hadoop-core-${version}.jar"tofile="${build.dir}/lib/hadoop-core.jar"verbose="true"/> <copyfile="${hadoop.root}/lib/commons-cli-1.2.jar" todir="${build.dir}/lib"verbose="true"/> <copyfile="${hadoop.root}/lib/commons-lang-2.4.jar" todir="${build.dir}/lib"verbose="true"/> <copyfile="${hadoop.root}/lib/commons-configuration-1.6.jar" todir="${build.dir}/lib"verbose="true"/> <copyfile="${hadoop.root}/lib/jackson-mapper-asl-1.8.8.jar" todir="${build.dir}/lib"verbose="true"/> <copyfile="${hadoop.root}/lib/jackson-core-asl-1.8.8.jar" todir="${build.dir}/lib"verbose="true"/> <copyfile="${hadoop.root}/lib/commons-httpclient-3.0.1.jar" todir="${build.dir}/lib"verbose="true"/> <copyfile="${hadoop.root}/lib/commons-cli-${commons-cli.version}.jar" todir="${build.dir}/lib"verbose="true"/>
d. 找到src\contrib\build-contrib.xml,添加以下几行: <propertyname="version" value="1.2.1"/> <property name="ivy.version"value="2.1.0"/> <propertyname="eclipse.home" location="F:/hadoop/eclipse"/>
e. 找到src\contrib\eclipse-plugin\META-INF,修改如下: 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
f. 打开命令行,进入目录\src\contrib\eclipse-plugin,输入ant编译,如果一切正常就编译通过了 g. 最后可以在{hadoop_home}\build\contrib\eclipse-plugin路径下找到编译好的插件 |
编译hadoop-eclipse-plugins-1.2.1插件步骤,布布扣,bubuko.com
编译hadoop-eclipse-plugins-1.2.1插件步骤
原文地址:http://www.cnblogs.com/scwanglijun/p/3758227.html