ubuntu 16.0 利用ant编译 hadoop-eclipse-plugins2.6.0

折腾了两天,抱着不放弃的精神,我终于编译出我自己所需的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中的插件进行如下:

[email protected]:/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

[email protected]:/usr/local/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin# ls
classes  examples  hadoop-eclipse-plugin-2.6.0.jar  lib  system  test

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

[email protected]:/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服务器

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

时间: 2024-10-12 08:11:50

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

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

利用ant编译nutch2.x 详见:1.    http://blog.javachen.com/2014/05/20/nutch-intro/   2.    wiki.apache.org/nutch/Nutch2Tutorial 前提条件:配置ant(http://www.cnblogs.com/xxx0624/p/4172277.html) 1. 下载nutch(例如:我的是apache-nutch-2.2.1-src.tar.gz) 解压,重命名nutch文件夹(命名为nutch),

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

本文转载自:[Android 编译(一)] Ubuntu 16.04 LTS 成功编译 Android 6.0 源码教程 1 前言 经过3天奋战,终于在Ubuntu 16.04上把Android 6.0的源码编译出来了,各种配置,各种error,各种爬坑,特写此博客记录爬坑经历.先上图,Ubuntu上编译完后成功运行模拟器,如图: 2 编译环境 UbuntuKylin 16.04 LTS Android 6.0_r1 Open JDK 7 3 准备工作 (1) 下载android 6.0源码.

ubuntu 16.04利用docker搭建java+tomcat+nginx反向代理/动静分离

ubuntu 16.04利用docker搭建java+tomcat+nginx反向代理 新建两个docker容器 docker run -it --name Tomcat-mysql -v /mnt:/mnt -p 8866:80 -p 33006:3306 ubuntu /bin/bash docker run -itd --name webserver -p 8888:80 -v /mnt/:/mnt/ ubuntu /bin/bash [email protected]:~# docker

关于自编译hadoop eclipse 插件

由于在eclipse下开发hadoop 程序需要插件支持,而且hadoop报下已经没有插件了,所以需要我们自己编译,操作步骤如下 1.进入D:\hadoop-1.2.1\src\contrib目录,找到build-contrib.xml文件 ,将hadoop.root改为hadoop解压目录. <property name="hadoop.root" location="D:\hadoop-1.2.1"/> 在下面添加如下两行:Eclipse安装根目录,

[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 qt support on Ubuntu 16.04 from source Series Part-1: Install and Configure Qt5 on Ubuntu 16.04 Part-2: Install and Configure VTK 8.1.0 from source wit

编译hadoop eclipse的插件(hadoop1.0)

原创文章,转载请注明: 转载自工学1号馆 欢迎关注我的个人博客:www.wuyudong.com, 更多云计算与大数据的精彩文章 在hadoop-1.0中,不像0.20.2版本,有现成的eclipse-plugin源码包,而是在HADOOP_HOME/src/contrib/eclipse-plugin目录下放置了eclipse插件的源码,这篇文章 ,我想详细记录一下自己是如何编译此源码生成适用于Hadoop1.0的eclipse插件 1.安装环境 操作系统:Ubuntu14.4软件:eclip

Ubuntu 16.04 LTS 成功编译 Android 6.0 源码教程 (转)

1 前言 经过3天奋战,终于在Ubuntu 16.04上把Android 6.0的源码编译出来了,各种配置,各种error,各种爬坑,特写此博客记录爬坑经历.先上图,Ubuntu上编译完后成功运行模拟器,如图: 2 编译环境 UbuntuKylin 16.04 LTS Android 6.0_r1 Open JDK 7 3 准备工作 (1) 下载Android 6.0源码. Androdi 6.0源码下载地址: http://pan.baidu.com/s/1o6N86a2 感谢下面这位博主上传

ubuntu 16.04源码编译和配置caffe详细教程 | Install and Configure Caffe on ubuntu 16.04

本文首发于个人博客https://kezunlin.me/post/b90033a9/,欢迎阅读! Install and Configure Caffe on ubuntu 16.04 Series Part 1: Install and Configure Caffe on windows 10 Part 2: Install and Configure Caffe on ubuntu 16.04 Guide requirements: NVIDIA driver 396.54 CUDA 8

Ubuntu 16.04 源码编译安装PHP7

一.下载PHP7的最新版源码 php7.0.9  下载地址 http://php.net/get/php-7.0.9.tar.gz/from/a/mirror 二.解压 tar -zxf /tmp/php-7.0.9.tar.gz 三.安装相关依赖库 sudo apt-get update sudo apt-get install libxml2-dev #安装gcc sudo apt-get install build-essential sudo apt-get install openss