Windows compiled Hadoop-eclipse-plugin-1.0.4.jar
1. Download the Apache ant package and decompress it to drive D.
2. Configure ant Environment Variables
Ant_home = D: \ apache-ant-1.8.4
Append % ant_home % \ bin after Path Environment Variable
3. Download hadoop-1.0.4.tar.gz and decompress it to drive D.
4. Modify the build-contrib.xml file under % hadoop_home % \ SRC \ contrib:
Add <projectname = "hadoopbuildcontrib" xmlns: Ivy = "antlib: org. Apache. Ivy. Ant">
<Property
Name = "Eclipse. Home" location = "Eclipse installation path>
<Property
Name = "version" value = "1.0.4"/>
5. Modify the build. xml file under % hadoop_home % \ SRC \ contrib \ eclipse-plugin:
Add
<Fileset
Dir ="
.../"> <Include name =" hadoop *. Jar "/> </fileset>
6. Copy the commons-cli-1.2.jar and to % hadoop_home % \ build \ Ivy \ Lib \ hadoop \ common \, copy the hadoop-core-1.0.4.jar to % hadoop_home % \ build
7. In the % hadoop_home % \ SRC \ contrib \ eclipse-plugin directory, right-click SHIFT +, choose here to open the command window, and enter ant
Jar, execute the command
8. Wait for the command line to prompt buildsuccessful. After compilation is successful, the hadoop-eclipse-plugin-1.0.4.jar file will be generated in the % hadoop_home % \ build \ contrib \ eclipse-plugin directory. (Note: This file is currently unavailable. If an exception occurs in the eclipse plugins directory, when map/reduce is enabled
When adding a hadoop location in the location view, this exception is reported: map/reducelocation status Updater ". org/codehaus/Jackson/MAP/jsonmappingexception ).
9. Add the following JAR file under the % hadoop_home % \ lib directory to the lib directory of the hadoop-eclipse-plugin-1.0.4.jar (open with a compression tool) jackson-core-asl-1.8.8.jar,
Jackson-mapper-asl-1.8.8.jar, commons-configuration-1.6.jar, commons-lang-2.4.jar, commons-httpclient-3.0.1.jar
10. Unzip the hadoop-eclipse-plugin-1.0.4.jar/manifest. MF in the META-INF file and modify the bundle-classpath:
Classes/, lib/hadoop-core.jar is
Bundle-classpath: classes/, lib/hadoop-core.jar, lib/jackson-core-asl-1.8.8.jar, lib/jackson-mapper-asl-1.8.8.jar, lib/commons-configuration-1.6.jar, lib/commons-lang-2.4.jar, lib/commons-httpclient-3.0.1.jar
11. Then replace the modified manifest. MF with the hadoop-eclipse-plugin-1.0.4.jar/manifest. MF file in the META-INF
12. After modification, the hadoop-eclipse-plugin-1.0.4.jar is the final file that can be used. Put this file in the eclipse plugins directory, restart eclipse, configure your map/celcelocation, and use eclipse to access hadoop and create MAP/reduce
Project
Reference: http://logicmd.net/2012/08/how-to-compile-hadoop-1-0-3/
9-11 step reference http://cloudfront.blogspot.com/2012_07_01_archive.html
Latest update. Pay attention to the eclipse version during packaging.
To run eclipse3.5 or a later version, you need to modify it. The modification method is as follows:
Edit: SRC \ contrib \ eclipse-plugin \ SRC \ Java \ org \ apache \ hadoop \ eclipse \ launch \ hadoopapplicationlaunchshortcut. Java
Make the following changes:
//import org.eclipse.jdt.internal.debug.ui.launcher.JavaApplicationLaunchShortcut;
import org.eclipse.jdt.debug.ui.launchConfigurations.JavaApplicationLaunchShortcut;
After modification, execute ant package in the hadoop directory to re-package the Eclipse plug-in.
In version 3.5, replace the above two