使用ant在window下编译不同hadoop版本的eclipse插件包Ant 1)下载 http://ant.apache.org/bindownl...

Ant

 

 

  1)下载

   http://ant.apache.org/bindownload.cgi

   apache-ant-1.9.4-bin.zip

 2)解压到一个盘,如图所示:

   

 3).环境变量的配置

    新建ANT_HOME=E:\ant\apache-ant-1.9.4-bin\apache-ant-1.9.4

    在PATH后面加;%ANT_HOME%\bin

 4)cmd 测试一下是否配置正确

    ant version   如图所示:

 

 

Hadoop

 

 1).下载hadoop包

    hadoop-2.6.0.tar.gz

   解压到本地磁盘,如图所示:

 

 

下载hadoop2x-eclipse-plugin源代码

 1)目前hadoop2的eclipse-plugins源代码由github脱管,下载地址是https://github.com/winghc/hadoop2x-eclipse-plugin,然后在右侧的Download ZIP连接点击下载,如图所示:

    

 

2)下载hadoop2x-eclipse-plugin-master.zip

   解压到本地磁盘,如图所示:

    

 

编译hadoop-eclipse-plugin插件

 

 

   

 1.hadoop2x-eclipse-plugin-master解压在E:盘打开命令行cmd,切换到E:\hadoop\hadoop2x-eclipse-plugin-master\src\contrib\eclipse-plugin 目录,如图所示:

 

     

 

2.执行ant jar

 

 

其中build.xml 文件内容如下:

 

 

 

 

其中MAINIFEST文件内容如下:

Manifest-Version: 1.0

Bundle-ManifestVersion: 2

Bundle-Name: MapReduce Tools for Eclipse

Bundle-SymbolicName: org.apache.hadoop.eclipse;singleton:=true

Bundle-Version: 0.18

Bundle-Activator: org.apache.hadoop.eclipse.Activator

Bundle-Localization: plugin

Require-Bundle: org.eclipse.ui,

 org.eclipse.core.runtime,

 org.eclipse.jdt.launching,

 org.eclipse.debug.core,

 org.eclipse.jdt,

 org.eclipse.jdt.core,

 org.eclipse.core.resources,

 org.eclipse.ui.ide,

 org.eclipse.jdt.ui,

 org.eclipse.debug.ui,

 org.eclipse.jdt.debug.ui,

 org.eclipse.core.expressions,

 org.eclipse.ui.cheatsheets,

 org.eclipse.ui.console,

 org.eclipse.ui.navigator,

 org.eclipse.core.filesystem,

 org.apache.commons.logging

Eclipse-LazyStart: true

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,lib/commons-cli-1.2.jar

 

Bundle-Vendor: Apache Hadoop

 

 

 

你可能感兴趣的:(Data,Mining,ant,eclipse,hadoop)