编译Hadoop eclipse plugin
Hadoop 版本 1.0.4
编辑${HADOOP_HOME}/src/contrib/build-contrib.xml
<project name="hadoopbuildcontrib" xmlns:ivy="antlib:org.apache.ivy.ant"> <property name="eclipse.home" location="/home/Develop/eclipse"/> <property name="version" value="1.0.4"/> <property name="name" value="${ant.project.name}"/> <property name="root" value="${basedir}"/> <property name="hadoop.root" location="${root}/../../../"/> <!-- Load all the default properties, and any the user wants --> <!-- to contribute (without having to type -D or edit this file --> </project>
编辑%Hadoop_HOME%\src\contrib\eclipse-plugin\build.xml
<path id="eclipse-sdk-jars"> <fileset dir="${eclipse.home}/plugins/"> <include name="org.eclipse.ui*.jar"/> <include name="org.eclipse.jdt*.jar"/> <include name="org.eclipse.core*.jar"/> <include name="org.eclipse.equinox*.jar"/> <include name="org.eclipse.debug*.jar"/> <include name="org.eclipse.osgi*.jar"/> <include name="org.eclipse.swt*.jar"/> <include name="org.eclipse.jface*.jar"/> <include name="org.eclipse.team.cvs.ssh2*.jar"/> <include name="com.jcraft.jsch*.jar"/> </fileset> <fileset dir="../../../"> <include name="hadoop*.jar"/> </fileset> </path> <pre>
然后ant
如有提示找不到hadoop-core-1.0.4,commons-cli-1.2.jar,只需复制到对应目录即可