折腾了两天,抱着不放弃的精神,我终于编译出我自己所需的hadoop中在eclipse中的插件

在网上下载的可能因为版本不一致,在编译的时候出现各种各样的问题,包括你的eclipse版本和hadoop版本 ,jdk版本,ant版本

所以下载好多个,最少十九个吧,但是一直没有成功,一直出现找不到包的异常信息,关于这个异常信息网上的信息很少

compile:
     [echo] contrib: eclipse-plugin
    [javac] Compiling 45 source files to /usr/hadoop/build/contrib/eclipse-plugin/classes
    [javac] /usr/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/Activator.java:22: package org.eclipse.ui.plugin does not exist
    [javac] import org.eclipse.ui.plugin.AbstractUIPlugin;
    [javac]                             ^
    [javac] /usr/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/Activator.java:23: package org.osgi.framework does not exist
    [javac] import org.osgi.framework.BundleContext;
    [javac]                          ^
    [javac] /usr/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/Activator.java:28: cannot find symbol
    [javac] symbol: class AbstractUIPlugin
    [javac] public class Activator extends AbstractUIPlugin {
    [javac]                                ^
    [javac] /usr/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/Activator.java:56: cannot find symbol
    [javac] symbol  : class BundleContext
    [javac] location: class org.apache.hadoop.eclipse.Activator
    [javac]   public void start(BundleContext context) throws Exception {
    [javac]                     ^
    [javac] /usr/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/Activator.java:62: cannot find symbol
    [javac] symbol  : class BundleContext
    [javac] location: class org.apache.hadoop.eclipse.Activator
    [javac]   public void stop(BundleContext context) throws Exception {
    [javac]                    ^
    [javac] /usr/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ErrorMessageDialog.java:21: package org.eclipse.jface.dialogs does not exist
    [javac] import org.eclipse.jface.dialogs.MessageDialog;
    [javac]                                 ^
    [javac] /usr/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/HadoopPerspectiveFactory.java:21: package org.eclipse.debug.ui does not exist
    [javac] import org.eclipse.debug.ui.IDebugUIConstants;
    [javac]                            ^
    [javac] /usr/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/HadoopPerspectiveFactory.java:22: package org.eclipse.jdt.ui does not exist
    [javac] import org.eclipse.jdt.ui.JavaUI;
    [javac]

所以大家在使用的时候一定要注意版本问题,如果大家的eclipse和hadoop版本跟我一样的话 请直接到我的网盘中下载吧

我的eclipse是

hadoop是2.6.0

资源下载地址如下:

https://pan.baidu.com/s/1dE9UN3z

网盘中还有eclipse和hadoop

hadoop2.x 制作eclipse的资源:https://pan.baidu.com/s/1c2tsd8k

我的eclipse和hadoop安装目录在linux虚拟机中如下:

在命令行中在hadoop-eclipse中的插件进行如下:

root@hett-virtual-machine:/usr/local/hadoop2x-eclipse-plugin/src/contrib/eclipse-plugin# ant jar -Dversion=2.6.0 -Declipse.home=/usr/local/eclipse -Dhadoop.home=/usr/local/hadoop
Buildfile: /usr/local/hadoop2x-eclipse-plugin/src/contrib/eclipse-plugin/build.xml

compile:
     [echo] contrib: eclipse-plugin
    [javac] Compiling 45 source files to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/classes
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.

jar:
    [mkdir] Created dir: /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib
     [copy] Copying 9 files to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib
     [copy] Copying /usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-app-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-mapreduce-client-app-2.6.0.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-common-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-mapreduce-client-common-2.6.0.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-mapreduce-client-core-2.6.0.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-hs-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-mapreduce-client-hs-2.6.0.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-hs-plugins-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-mapreduce-client-hs-plugins-2.6.0.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-2.6.0-tests.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-mapreduce-client-jobclient-2.6.0-tests.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-mapreduce-client-jobclient-2.6.0.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-shuffle-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-mapreduce-client-shuffle-2.6.0.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-mapreduce-examples-2.6.0.jar
     [copy] Copying 3 files to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib
     [copy] Copying /usr/local/hadoop/share/hadoop/common/hadoop-common-2.6.0-tests.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-common-2.6.0-tests.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/common/hadoop-common-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-common-2.6.0.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/common/hadoop-nfs-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-nfs-2.6.0.jar
     [copy] Copying 3 files to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib
     [copy] Copying /usr/local/hadoop/share/hadoop/hdfs/hadoop-hdfs-2.6.0-tests.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-hdfs-2.6.0-tests.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/hdfs/hadoop-hdfs-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-hdfs-2.6.0.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/hdfs/hadoop-hdfs-nfs-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-hdfs-nfs-2.6.0.jar
     [copy] Copying 12 files to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib
     [copy] Copying /usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-api-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-yarn-api-2.6.0.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-applications-distributedshell-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-yarn-applications-distributedshell-2.6.0.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-applications-unmanaged-am-launcher-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-yarn-applications-unmanaged-am-launcher-2.6.0.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-client-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-yarn-client-2.6.0.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-common-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-yarn-common-2.6.0.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-registry-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-yarn-registry-2.6.0.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-server-applicationhistoryservice-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-yarn-server-applicationhistoryservice-2.6.0.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-server-common-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-yarn-server-common-2.6.0.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-server-nodemanager-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-yarn-server-nodemanager-2.6.0.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-server-resourcemanager-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-yarn-server-resourcemanager-2.6.0.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-server-tests-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-yarn-server-tests-2.6.0.jar
     [copy] Copying /usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-server-web-proxy-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-yarn-server-web-proxy-2.6.0.jar
     [copy] Copying 1 file to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib
     [copy] Copying /usr/local/hadoop/share/hadoop/common/lib/protobuf-java-2.5.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/protobuf-java-2.5.0.jar
     [copy] Copying 1 file to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib
     [copy] Copying /usr/local/hadoop/share/hadoop/common/lib/log4j-1.2.17.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/log4j-1.2.17.jar
     [copy] Copying 1 file to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib
     [copy] Copying /usr/local/hadoop/share/hadoop/common/lib/commons-cli-1.2.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/commons-cli-1.2.jar
     [copy] Copying 1 file to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib
     [copy] Copying /usr/local/hadoop/share/hadoop/common/lib/commons-configuration-1.6.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/commons-configuration-1.6.jar
     [copy] Copying 1 file to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib
     [copy] Copying /usr/local/hadoop/share/hadoop/common/lib/commons-lang-2.6.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/commons-lang-2.6.jar
     [copy] Copying 1 file to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib
     [copy] Copying /usr/local/hadoop/share/hadoop/common/lib/commons-collections-3.2.1.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/commons-collections-3.2.1.jar
     [copy] Copying 1 file to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib
     [copy] Copying /usr/local/hadoop/share/hadoop/common/lib/jackson-core-asl-1.9.13.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/jackson-core-asl-1.9.13.jar
     [copy] Copying 1 file to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib
     [copy] Copying /usr/local/hadoop/share/hadoop/common/lib/jackson-mapper-asl-1.9.13.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/jackson-mapper-asl-1.9.13.jar
     [copy] Copying 1 file to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib
     [copy] Copying /usr/local/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/slf4j-log4j12-1.7.5.jar
     [copy] Copying 1 file to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib
     [copy] Copying /usr/local/hadoop/share/hadoop/common/lib/slf4j-api-1.7.5.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/slf4j-api-1.7.5.jar
     [copy] Copying 1 file to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib
     [copy] Copying /usr/local/hadoop/share/hadoop/common/lib/guava-11.0.2.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/guava-11.0.2.jar
     [copy] Copying 1 file to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib
     [copy] Copying /usr/local/hadoop/share/hadoop/common/lib/hadoop-auth-2.6.0.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/hadoop-auth-2.6.0.jar
     [copy] Copying 1 file to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib
     [copy] Copying /usr/local/hadoop/share/hadoop/common/lib/netty-3.6.2.Final.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/netty-3.6.2.Final.jar
     [copy] Copying 1 file to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib
     [copy] Copying /usr/local/hadoop/share/hadoop/common/lib/htrace-core-3.0.4.jar to /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib/htrace-core-3.0.4.jar
      [jar] Building jar: /usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/hadoop-eclipse-plugin-2.6.0.jar

BUILD SUCCESSFUL
Total time: 6 seconds

root@hett-virtual-machine:/usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin# ls
classes  examples  hadoop-eclipse-plugin-2.6.0.jar  lib  system  test

编译后的目标文件存放在如下

root@hett-virtual-machine:/usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin# cp hadoop-eclipse-plugin-2.6.0.jar /home/hett/eclipse/jee-oxygen/eclipse/plugins/

把编译好的jar包放到eclipse中的plugins

配置远程使用hadoop服务器

辛苦了好久 终于出来了啊 好开心啊

ubuntu 16.0 利用ant编译 hadoop-eclipse-plugins2.6.0的更多相关文章

  1. Ubuntu环境下利用ant编译nutch2.2.1 & 配置nutch2.2.1

    /×××××××××××××××××××××××××××××××××××××××××/ Author:xxx0624 HomePage:http://www.cnblogs.com/xxx0624/ ...

  2. Windows平台上使用ANT编译Hadoop Eclipse Plugin

    一.准备工作:   1.安装JDK 下载页面:http://www.oracle.com/technetwork/java/javase/downloads/index.html JDK6,JDK7都 ...

  3. 第四章.使用ant编译hadoop eclipse插件

    从hadoop 0.20.203以后,hadoop的发布包里,不再对eclipse插件进行jar包发布,而是给出了打包的代码,需要各位开发人员自己进行打包和设置.我们打的包必须跟自己使用的hadoop ...

  4. Ubuntu 16.04源码编译安装nginx 1.10.0

    一.下载相关的依赖库 pcre 下载地址 http://120.52.73.43/jaist.dl.sourceforge.net/project/pcre/pcre/8.38/pcre-8.38.t ...

  5. [Android 编译(一)] Ubuntu 16.04 LTS 成功编译 Android 6.0 源码教程

    本文转载自:[Android 编译(一)] Ubuntu 16.04 LTS 成功编译 Android 6.0 源码教程 1 前言 经过3天奋战,终于在Ubuntu 16.04上把Android 6. ...

  6. 使用Ant编译Hadoop工程报错

    在win7用Ant编译hadoop工程的时候,遇到了一个报错,如下: org.eclipse.core.runtime.CoreException: D:\workspace\hadoop-1.1.2 ...

  7. 在Ubuntu 16.04 LTS下编译安装OpenCV 4.1.1

    目录 一 安装前的准备 二 编译并安装OpenCV 4.1.1 注:原创不易,转载请务必注明原作者和出处,感谢支持! OpenCV目前(2019-8-1)的最新版本为4.1.1.本文将介绍如何在Ubu ...

  8. [Part 3] 在Ubuntu 16.04源码编译PCL 1.8.1支持VTK和QT

    本文首发于个人博客https://kezunlin.me/post/137aa5fc/,欢迎阅读! Part-3: Install and Configure PCL 1.8.1 with vtk q ...

  9. Ubuntu 16.04 安装最新稳定版Nginx 1.6.0

    Ubuntu 16.04 默认安装的是nginx 1.14.0 #默认安装方式:apt-get  install nginx   1.查看是否安装nginx,如果已经安装,请先卸载 #查看安装版本 d ...

随机推荐

  1. Linux下共享库嵌套依赖问题 (转载)

    转自:http://my.oschina.net/moooofly/blog/506466 问题场景: 动态库 librabbitmq_r.so 内部依赖动态库 libevent_core.so 和 ...

  2. AndroidStudio关联GitHub

    1.前提: 1.已有github账号和密码 github官方网站:https://github.com/ 2.下载了git客户端 客户端下载地址:http://pan.baidu.com/s/1slV ...

  3. Weekly Contest 111-------->941. Valid Mountain Array(max_element)

    Given an array A of integers, return true if and only if it is a valid mountain array. Recall that A ...

  4. HDU3478 【判奇环/二分图的性质】

    题意: 给你一幅图,给你一个起点,然后问你存不存在一个时刻,所有点可以在那个时刻到达. 思路: 这幅图首先是联通的: 如果出现奇数环,则满足在某一时刻都可能到达: 然后判断奇数环用二分图性质搞也是神奇 ...

  5. CodeForces717C 【数学】

    题意: 给你n个数既表示a类的值也表示b类的值,然后计算a和b类两两搭配相乘相加,使得答案最小: 思路: 显而易见的方案是最小乘最大,次小乘次大,然后依次下去.. 可以那个特例证明这个是对的 #inc ...

  6. Codevs 1523 地精部落

    1523 地精部落 省队选拔赛  时间限制: 1 s  空间限制: 256000 KB  题目等级 : 大师 Master 题解       题目描述 Description 传说很久以前,大地上居住 ...

  7. IT兄弟连 JavaWeb教程 MVC设计模式

    MVC是Model-View-Controller的简称,即模型-视图-控制器.MVC是一种设计模式,它强制性地把应用程序的数据展示.数据处理和流程控制分开.MVC把应用程序分成3个核心模块:模型.视 ...

  8. HTTP1.1规范下载 6个文档组成

  9. java的无序机制

    简单说一下上面提到的无序写,这是jvm的特性,比如声明两个变量,String a; String b; jvm可能先加载a也可能先加载b.同理,instance = new Singleton();可 ...

  10. SpringBoot | quartz | @DisallowConcurrentExecution

    注释放在job类上, 作用: 将该注解加到job类上,告诉Quartz不要并发地执行同一个job定义(这里指特定的job类)的多个实例.