Use Ant to compile the Hadoop eclipse plug-in

Source: Internet
Author: User

I have successfully generated a plug-in using this method.

Download hadoop's release,

Download ant

Decompress ant to the hard disk, such as D: \ ant.

Set Environment Variables

Ant_home = D: \ ant

Add % ant_home % \ bin to path.

Decompress hadoop's release.

Enter % hadoop_home % \ SRC \ contrib \

Edit build-contrib.xml

Join

<Property name = "version" value = "1.0.3"/>

<Property name = "Eclipse. Home" location = "D:/soft/eclipse-jee-indigo-SR1-win32/Eclipse"/>

Copy the jar package under % hadoop_home % To the Plugins directory of the eclipse directory, such as hadoop-core-*. jar.

Enter % hadoop_home % \ SRC \ contrib \ eclipse-plugin

Edit build. xml

In

<Path id = "eclipse-SDK-jars">

<Fileset dir = "$ {eclipse. Home}/plugins/">

</Fileset>

</Path>

Join

<Include name = "hadoop *. jar"/>

In the compile module

Deprecation = "$ {javac. deprecation}

Remove.

Open CMD and use ant in % Hadoop_HOME % \ src \ contrib \ eclipse-plugin

Then compile.

 
 
  1. jar: 
  2.      [echo] version:1.0.3 
  3.      [copy] Copying 1 file to D:\hadoop-1.0.3\build\contrib\eclipse-plugin\lib 
  4.      [copy] Copying D:\hadoop-1.0.3\build\ivy\lib\Hadoop\common\commons-cli-1.2. 
  5. jar to D:\hadoop-1.0.3\build\contrib\eclipse-plugin\lib\commons-cli-1.2.jar 
  6.       [jar] Building jar: D:\hadoop-1.0.3\build\contrib\eclipse-plugin\hadoop-ec 
  7. lipse-plugin-1.0.3.jar 
  8.  
  9. BUILD SUCCESSFUL 
  10. Total time: 2 seconds 

Note: errors may be reported during compilation, mainly due to the copy problem during jar, copy the commons-cli-1.2.jar and to % HADOOP_HOME % \ build \ ivy \ lib \ Hadoop \ common \, copy the hadoop-core-1.0.3.jar to % HADOOP_HOME % \ build.

These directories may not exist. Create one by yourself!

After compilation is successful, the hadoop-eclipse-plugin-1.0.3.jar is generated under % Hadoop_Home % \ build \ contrib \ eclipse-plugin. Copy it to the plugins directory in the eclipse directory. Re-open eclipse

Select window-open perspective-other and you will see

Select Map/Reduce

Select window-show view-other

Select Map/Reduce Locaions

The hadoop plug-in of eclipse is compiled successfully.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.