Hadoop上路-手动制作hadoop-eclipse-plugin插件

本文是对原文的不完全转载,或者说是对原文的引用吧,

由于本人并非在虚拟机而是在实体机下编译的hadoop-eclipse-plugin.jar,所以只是转载了一部分,

原文链接:http://my.oschina.net/vigiles/blog/132238

实践环境:

Ubuntu 12.04 64位

JDK1.7

hadoop 1.2.1,单机伪分布式

一.配置hadoop:


1.%hadoop%/src/contrib/eclipse-plugin/build.xml

1)取消ivy-download:

2)添加将要打包到plugin中的第三方jar包列表:  

<!-- Override jar target to specify manifest -->  
<target name="jar" depends="compile" unless="skip.contrib"> 
<mkdir dir="${build.dir}/lib"/>  

<!-- 自定义的修改内容:begin -->  
<!--
<copy file="${hadoop.root}/build/hadoop-core-${version}.jar" 
  tofile="${build.dir}/lib/hadoop-core.jar" verbose="true"/>
<copy file="${hadoop.root}/build/ivy/lib/Hadoop/common/commons-cli-${commons-cli.version}.jar"  
  todir="${build.dir}/lib" verbose="true"/>  
-->  
<copy file="${hadoop.root}/hadoop-core-${version}.jar" tofile="${build.dir}/lib/hadoop-core.jar" verbose="true"/>
<copy file="${hadoop.root}/lib/commons-cli-1.2.jar"  todir="${build.dir}/lib" verbose="true"/>  
<copy file="${hadoop.root}/lib/commons-configuration-1.6.jar"  todir="${build.dir}/lib" verbose="true"/>  
<copy file="${hadoop.root}/lib/commons-httpclient-3.0.1.jar"  todir="${build.dir}/lib" verbose="true"/>  
<copy file="${hadoop.root}/lib/commons-lang-2.4.jar"  todir="${build.dir}/lib" verbose="true"/>   
<copy file="${hadoop.root}/lib/jackson-core-asl-1.8.8.jar"  todir="${build.dir}/lib" verbose="true"/>
<copy file="${hadoop.root}/lib/jackson-mapper-asl-1.8.8.jar"  todir="${build.dir}/lib" verbose="true"/>   
<!-- 自定义的修改内容:end -->  
<jar
jarfile="${build.dir}/hadoop-${name}-${version}.jar" 
manifest="${root}/META-INF/MANIFEST.MF">  
<fileset dir="${build.dir}" includes="classes/ lib/"/>  
<fileset dir="${root}" includes="resources/ plugin.xml"/>  
</jar>  
</target><span style="font-size:10pt;line-height:1.5;font-family:'sans serif', tahoma, verdana, helvetica;">  </span>

2.%hadoop%/src/contrib/build-contrib.xml : 

1)添加hadoop的version和eclipse的eclipse.home属性:  

<?xml version="1.0"?>
<!-- Imported by contrib/*/build.xml files to share generic targets. -->
<project name="hadoopbuildcontrib" xmlns:ivy="antlib:org.apache.ivy.ant">
<property name="name" value="${ant.project.name}"/>
<property name="root" value="${basedir}"/>
<property name="hadoop.root" location="${root}/../../../"/>
<!-- hadoop版本、eclipse安装路径 --> 
<property name="version" value="1.1.2"/>
<property name="eclipse.home" location="%eclipse%"/>

2)取消ivy-download: 

 

3.编辑%HADOOP_HOME%/build.xml:

1)修改hadoop版本号:

2)取消ivy-download:

 

4.修改%hadoop%/src/contrib/eclipse-plugin/META-INF/MANIFEST.MF: 

修改${HADOOP_HOME}/src/contrib/eclipse-plugin/META-INF/MANIFEST.MF的Bundle-ClassPath :

Bundle-ClassPath: classes/,
 lib/hadoop-core.jar,
 lib/commons-cli-1.2.jar,
 lib/commons-configuration-1.6.jar,
 lib/commons-httpclient-3.0.1.jar,
 lib/commons-lang-2.4.jar,
 lib/jackson-core-asl-1.8.8.jar,
 lib/jackson-mapper-asl-1.8.8.jar

二.执行ANT:  

1.进入到%hadoop%/执行ant compile:   

hep@hep-ubuntu:~/hadoop$ ant compile

#此处略去N行

init:
     [echo] contrib: fairscheduler
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/fairscheduler
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/fairscheduler/classes
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/fairscheduler/test
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/fairscheduler/system
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/fairscheduler/system/classes
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/fairscheduler/examples
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/fairscheduler/test/logs

init-contrib:

ivy-probe-antlib:

ivy-init-antlib:

ivy-init:
[ivy:configure] :: loading settings :: file = /home/hep/hadoop/ivy/ivysettings.xml

ivy-resolve-common:
[ivy:resolve] :: resolving dependencies :: org.apache.hadoop#fairscheduler;working@hep-ubuntu
[ivy:resolve] 	confs: [common]
[ivy:resolve] 	found commons-logging#commons-logging;1.0.4 in maven2
[ivy:resolve] 	found commons-collections#commons-collections;3.1 in maven2
[ivy:resolve] 	found commons-cli#commons-cli;1.2 in maven2
[ivy:resolve] 	found log4j#log4j;1.2.15 in maven2
[ivy:resolve] 	found junit#junit;4.5 in maven2
[ivy:resolve] 	found org.mortbay.jetty#jetty-util;6.1.26 in maven2
[ivy:resolve] 	found org.mortbay.jetty#jetty;6.1.26 in maven2
[ivy:resolve] 	found org.mortbay.jetty#servlet-api;2.5-20081211 in maven2
[ivy:resolve] 	found org.mortbay.jetty#jsp-api-2.1;6.1.14 in maven2
[ivy:resolve] 	found org.codehaus.jackson#jackson-core-asl;1.8.8 in maven2
[ivy:resolve] 	found org.codehaus.jackson#jackson-mapper-asl;1.8.8 in maven2
[ivy:resolve] 	found commons-httpclient#commons-httpclient;3.0.1 in maven2
[ivy:resolve] 	found commons-configuration#commons-configuration;1.6 in maven2
[ivy:resolve] 	found org.apache.commons#commons-math;2.1 in maven2
[ivy:resolve] 	found commons-lang#commons-lang;2.4 in maven2
[ivy:resolve] downloading http://repo1.maven.org/maven2/commons-collections/commons-collections/3.1/commons-collections-3.1.jar ...
[ivy:resolve] ..................
[ivy:resolve] ........................................
[ivy:resolve] .........................................
[ivy:resolve] ....................................... (546kB)
[ivy:resolve] .. (0kB)
[ivy:resolve] 	[SUCCESSFUL ] commons-collections#commons-collections;3.1!commons-collections.jar (7793ms)
[ivy:resolve] downloading http://repo1.maven.org/maven2/org/mortbay/jetty/jsp-api-2.1/6.1.14/jsp-api-2.1-6.1.14.jar ...
[ivy:resolve] ................................ (131kB)
[ivy:resolve] .. (0kB)
[ivy:resolve] 	[SUCCESSFUL ] org.mortbay.jetty#jsp-api-2.1;6.1.14!jsp-api-2.1.jar (2364ms)
[ivy:resolve] :: resolution report :: resolve 11591ms :: artifacts dl 10176ms
	---------------------------------------------------------------------
	|                  |            modules            ||   artifacts   |
	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
	---------------------------------------------------------------------
	|      common      |   15  |   2   |   2   |   0   ||   15  |   2   |
	---------------------------------------------------------------------

ivy-retrieve-common:
[ivy:retrieve] :: retrieving :: org.apache.hadoop#fairscheduler [sync]
[ivy:retrieve] 	confs: [common]
[ivy:retrieve] 	15 artifacts copied, 0 already retrieved (4672kB/26ms)
[ivy:cachepath] DEPRECATED: 'ivy.conf.file' is deprecated, use 'ivy.settings.file' instead
[ivy:cachepath] :: loading settings :: file = /home/hep/hadoop/ivy/ivysettings.xml

compile:
     [echo] contrib: fairscheduler
    [javac] /home/hep/hadoop/src/contrib/build-contrib.xml:191: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 21 source files to /home/hep/hadoop/build/contrib/fairscheduler/classes
    [javac] 注: 某些输入文件使用或覆盖了已过时的 API。
    [javac] 注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。

check-libhdfs-fuse:

check-libhdfs-exists:

compile:

check-contrib:

init:
     [echo] contrib: gridmix
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/gridmix
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/gridmix/classes
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/gridmix/test
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/gridmix/system
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/gridmix/system/classes
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/gridmix/examples
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/gridmix/test/logs

init-contrib:

ivy-probe-antlib:

ivy-init-antlib:

ivy-init:
[ivy:configure] :: loading settings :: file = /home/hep/hadoop/ivy/ivysettings.xml

ivy-resolve-common:
[ivy:resolve] :: resolving dependencies :: org.apache.hadoop#gridmix;working@hep-ubuntu
[ivy:resolve] 	confs: [common]
[ivy:resolve] 	found commons-logging#commons-logging;1.0.4 in maven2
[ivy:resolve] 	found log4j#log4j;1.2.15 in maven2
[ivy:resolve] 	found junit#junit;4.5 in maven2
[ivy:resolve] 	found commons-httpclient#commons-httpclient;3.0.1 in maven2
[ivy:resolve] 	found commons-codec#commons-codec;1.4 in maven2
[ivy:resolve] 	found commons-net#commons-net;3.1 in maven2
[ivy:resolve] 	found org.mortbay.jetty#jetty;6.1.26 in maven2
[ivy:resolve] 	found org.mortbay.jetty#jetty-util;6.1.26 in maven2
[ivy:resolve] 	found org.mortbay.jetty#servlet-api;2.5-20081211 in maven2
[ivy:resolve] 	found org.mortbay.jetty#jsp-api-2.1;6.1.14 in maven2
[ivy:resolve] 	found org.mortbay.jetty#jsp-2.1;6.1.14 in maven2
[ivy:resolve] 	found asm#asm;3.2 in maven2
[ivy:resolve] 	found com.sun.jersey#jersey-core;1.8 in maven2
[ivy:resolve] 	found com.sun.jersey#jersey-json;1.8 in maven2
[ivy:resolve] 	found com.sun.jersey#jersey-server;1.8 in maven2
[ivy:resolve] 	found commons-cli#commons-cli;1.2 in maven2
[ivy:resolve] 	found org.codehaus.jackson#jackson-mapper-asl;1.8.8 in maven2
[ivy:resolve] 	found org.codehaus.jackson#jackson-core-asl;1.8.8 in maven2
[ivy:resolve] 	found commons-configuration#commons-configuration;1.6 in maven2
[ivy:resolve] 	found commons-collections#commons-collections;3.2.1 in maven2
[ivy:resolve] 	found commons-lang#commons-lang;2.4 in maven2
[ivy:resolve] 	found commons-logging#commons-logging;1.1.1 in maven2
[ivy:resolve] 	found commons-digester#commons-digester;1.8 in maven2
[ivy:resolve] 	found commons-beanutils#commons-beanutils;1.7.0 in maven2
[ivy:resolve] 	found commons-beanutils#commons-beanutils-core;1.8.0 in maven2
[ivy:resolve] 	found org.apache.commons#commons-math;2.1 in maven2
[ivy:resolve] downloading http://repo1.maven.org/maven2/org/mortbay/jetty/jsp-2.1/6.1.14/jsp-2.1-6.1.14.jar ...
[ivy:resolve] ................................................................................
[ivy:resolve] ...........................................................................
[ivy:resolve] ............................................ (1000kB)
[ivy:resolve] .. (0kB)
[ivy:resolve] 	[SUCCESSFUL ] org.mortbay.jetty#jsp-2.1;6.1.14!jsp-2.1.jar (5438ms)
[ivy:resolve] :: resolution report :: resolve 3147ms :: artifacts dl 5453ms
[ivy:resolve] 	:: evicted modules:
[ivy:resolve] 	commons-logging#commons-logging;1.0.4 by [commons-logging#commons-logging;1.1.1] in [common]
[ivy:resolve] 	commons-logging#commons-logging;1.0.3 by [commons-logging#commons-logging;1.1.1] in [common]
[ivy:resolve] 	commons-logging#commons-logging;1.1 by [commons-logging#commons-logging;1.1.1] in [common]
	---------------------------------------------------------------------
	|                  |            modules            ||   artifacts   |
	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
	---------------------------------------------------------------------
	|      common      |   28  |   1   |   1   |   3   ||   25  |   1   |
	---------------------------------------------------------------------

ivy-retrieve-common:
[ivy:retrieve] :: retrieving :: org.apache.hadoop#gridmix [sync]
[ivy:retrieve] 	confs: [common]
[ivy:retrieve] 	25 artifacts copied, 0 already retrieved (7872kB/77ms)
[ivy:cachepath] DEPRECATED: 'ivy.conf.file' is deprecated, use 'ivy.settings.file' instead
[ivy:cachepath] :: loading settings :: file = /home/hep/hadoop/ivy/ivysettings.xml

compile:
     [echo] contrib: gridmix
    [javac] /home/hep/hadoop/src/contrib/build-contrib.xml:191: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 44 source files to /home/hep/hadoop/build/contrib/gridmix/classes
    [javac] 注: /home/hep/hadoop/src/contrib/gridmix/src/java/org/apache/hadoop/mapred/gridmix/PseudoLocalFs.java使用或覆盖了已过时的 API。
    [javac] 注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
    [javac] 注: 某些输入文件使用了未经检查或不安全的操作。
    [javac] 注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。
Trying to override old definition of task macro_tar

check-contrib:

init:
     [echo] contrib: hdfsproxy
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/hdfsproxy
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/hdfsproxy/classes
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/hdfsproxy/test
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/hdfsproxy/system
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/hdfsproxy/system/classes
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/hdfsproxy/examples
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/hdfsproxy/test/logs

init-contrib:

ivy-probe-antlib:

ivy-init-antlib:

ivy-init:

ivy-resolve-common:
[ivy:resolve] :: loading settings :: file = /home/hep/hadoop/ivy/ivysettings.xml
[ivy:resolve] :: resolving dependencies :: org.apache.hadoop#hdfsproxy;working@hep-ubuntu
[ivy:resolve] 	confs: [common]
[ivy:resolve] 	found commons-httpclient#commons-httpclient;3.0.1 in maven2
[ivy:resolve] 	found commons-logging#commons-logging;1.0.4 in maven2
[ivy:resolve] 	found commons-cli#commons-cli;1.2 in maven2
[ivy:resolve] 	found log4j#log4j;1.2.15 in maven2
[ivy:resolve] 	found commons-logging#commons-logging-api;1.0.4 in maven2
[ivy:resolve] 	found junit#junit;4.5 in maven2
[ivy:resolve] 	found org.slf4j#slf4j-api;1.4.3 in maven2
[ivy:resolve] 	found org.slf4j#slf4j-log4j12;1.4.3 in maven2
[ivy:resolve] 	found xmlenc#xmlenc;0.52 in maven2
[ivy:resolve] 	found org.mortbay.jetty#jetty;6.1.26 in maven2
[ivy:resolve] 	found org.mortbay.jetty#jetty-util;6.1.26 in maven2
[ivy:resolve] 	found org.mortbay.jetty#servlet-api;2.5-20081211 in maven2
[ivy:resolve] 	found asm#asm;3.2 in maven2
[ivy:resolve] 	found com.sun.jersey#jersey-core;1.8 in maven2
[ivy:resolve] 	found com.sun.jersey#jersey-json;1.8 in maven2
[ivy:resolve] 	found com.sun.jersey#jersey-server;1.8 in maven2
[ivy:resolve] 	found org.eclipse.jdt#core;3.1.1 in maven2
[ivy:resolve] 	found org.codehaus.jackson#jackson-mapper-asl;1.8.8 in maven2
[ivy:resolve] 	found org.codehaus.jackson#jackson-core-asl;1.8.8 in maven2
[ivy:resolve] 	found commons-configuration#commons-configuration;1.6 in maven2
[ivy:resolve] 	found commons-collections#commons-collections;3.2.1 in maven2
[ivy:resolve] 	found commons-lang#commons-lang;2.4 in maven2
[ivy:resolve] 	found commons-logging#commons-logging;1.1.1 in maven2
[ivy:resolve] 	found commons-digester#commons-digester;1.8 in maven2
[ivy:resolve] 	found commons-beanutils#commons-beanutils;1.7.0 in maven2
[ivy:resolve] 	found commons-beanutils#commons-beanutils-core;1.8.0 in maven2
[ivy:resolve] 	found org.apache.commons#commons-math;2.1 in maven2
[ivy:resolve] :: resolution report :: resolve 214ms :: artifacts dl 12ms
[ivy:resolve] 	:: evicted modules:
[ivy:resolve] 	commons-logging#commons-logging;1.0.4 by [commons-logging#commons-logging;1.1.1] in [common]
[ivy:resolve] 	commons-logging#commons-logging;1.0.3 by [commons-logging#commons-logging;1.1.1] in [common]
[ivy:resolve] 	commons-logging#commons-logging;1.1 by [commons-logging#commons-logging;1.1.1] in [common]
	---------------------------------------------------------------------
	|                  |            modules            ||   artifacts   |
	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
	---------------------------------------------------------------------
	|      common      |   29  |   0   |   0   |   3   ||   26  |   0   |
	---------------------------------------------------------------------

ivy-retrieve-common:
[ivy:retrieve] :: retrieving :: org.apache.hadoop#hdfsproxy [sync]
[ivy:retrieve] 	confs: [common]
[ivy:retrieve] 	26 artifacts copied, 0 already retrieved (9963kB/37ms)
[ivy:cachepath] :: loading settings :: file = /home/hep/hadoop/ivy/ivysettings.xml

compile:
     [echo] contrib: hdfsproxy
    [javac] /home/hep/hadoop/src/contrib/build-contrib.xml:191: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 12 source files to /home/hep/hadoop/build/contrib/hdfsproxy/classes
    [javac] 注: /home/hep/hadoop/src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/AuthorizationFilter.java使用了未经检查或不安全的操作。
    [javac] 注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。

compile:
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/hod
     [copy] Copying 69 files to /home/hep/hadoop/build/contrib/hod

check-contrib:

init:
     [echo] contrib: index
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/index
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/index/classes
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/index/test
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/index/system
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/index/system/classes
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/index/examples
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/index/test/logs

init-contrib:

ivy-probe-antlib:

ivy-init-antlib:

ivy-init:
[ivy:configure] :: loading settings :: file = /home/hep/hadoop/ivy/ivysettings.xml

ivy-resolve-common:
[ivy:resolve] :: resolving dependencies :: org.apache.hadoop#index;working@hep-ubuntu
[ivy:resolve] 	confs: [common]
[ivy:resolve] 	found commons-logging#commons-logging;1.0.4 in maven2
[ivy:resolve] 	found log4j#log4j;1.2.15 in maven2
[ivy:resolve] 	found junit#junit;4.5 in maven2
[ivy:resolve] 	found org.mortbay.jetty#jetty-util;6.1.26 in maven2
[ivy:resolve] 	found org.mortbay.jetty#jetty;6.1.26 in maven2
[ivy:resolve] 	found org.mortbay.jetty#servlet-api;2.5-20081211 in maven2
[ivy:resolve] 	found asm#asm;3.2 in maven2
[ivy:resolve] 	found com.sun.jersey#jersey-core;1.8 in maven2
[ivy:resolve] 	found com.sun.jersey#jersey-json;1.8 in maven2
[ivy:resolve] 	found com.sun.jersey#jersey-server;1.8 in maven2
[ivy:resolve] 	found org.apache.lucene#lucene-core;2.3.1 in maven2
[ivy:resolve] 	found commons-configuration#commons-configuration;1.6 in maven2
[ivy:resolve] 	found commons-collections#commons-collections;3.2.1 in maven2
[ivy:resolve] 	found commons-lang#commons-lang;2.4 in maven2
[ivy:resolve] 	found commons-logging#commons-logging;1.1.1 in maven2
[ivy:resolve] 	found commons-digester#commons-digester;1.8 in maven2
[ivy:resolve] 	found commons-beanutils#commons-beanutils;1.7.0 in maven2
[ivy:resolve] 	found commons-beanutils#commons-beanutils-core;1.8.0 in maven2
[ivy:resolve] 	found org.apache.commons#commons-math;2.1 in maven2
[ivy:resolve] 	found org.codehaus.jackson#jackson-core-asl;1.8.8 in maven2
[ivy:resolve] downloading http://repo1.maven.org/maven2/org/apache/lucene/lucene-core/2.3.1/lucene-core-2.3.1.jar ...
[ivy:resolve] ........................................................
[ivy:resolve] ...................................................................................... (649kB)
[ivy:resolve] .. (0kB)
[ivy:resolve] 	[SUCCESSFUL ] org.apache.lucene#lucene-core;2.3.1!lucene-core.jar (4404ms)
[ivy:resolve] :: resolution report :: resolve 7903ms :: artifacts dl 4415ms
[ivy:resolve] 	:: evicted modules:
[ivy:resolve] 	commons-logging#commons-logging;1.0.4 by [commons-logging#commons-logging;1.1.1] in [common]
[ivy:resolve] 	commons-logging#commons-logging;1.0.3 by [commons-logging#commons-logging;1.1.1] in [common]
[ivy:resolve] 	commons-logging#commons-logging;1.1 by [commons-logging#commons-logging;1.1.1] in [common]
	---------------------------------------------------------------------
	|                  |            modules            ||   artifacts   |
	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
	---------------------------------------------------------------------
	|      common      |   22  |   1   |   1   |   3   ||   19  |   1   |
	---------------------------------------------------------------------

ivy-retrieve-common:
[ivy:retrieve] :: retrieving :: org.apache.hadoop#index [sync]
[ivy:retrieve] 	confs: [common]
[ivy:retrieve] 	19 artifacts copied, 0 already retrieved (6099kB/15ms)
[ivy:cachepath] DEPRECATED: 'ivy.conf.file' is deprecated, use 'ivy.settings.file' instead
[ivy:cachepath] :: loading settings :: file = /home/hep/hadoop/ivy/ivysettings.xml

compile:
     [echo] contrib: index
    [javac] /home/hep/hadoop/src/contrib/build-contrib.xml:191: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 29 source files to /home/hep/hadoop/build/contrib/index/classes
    [javac] 注: 某些输入文件使用或覆盖了已过时的 API。
    [javac] 注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
    [javac] 注: /home/hep/hadoop/src/contrib/index/src/java/org/apache/hadoop/contrib/index/mapred/IndexUpdateMapper.java使用了未经检查或不安全的操作。
    [javac] 注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。

check-contrib:

init:
     [echo] contrib: streaming
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/streaming
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/streaming/classes
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/streaming/test
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/streaming/system
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/streaming/system/classes
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/streaming/examples
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/streaming/test/logs

init-contrib:

ivy-probe-antlib:

ivy-init-antlib:

ivy-init:
[ivy:configure] :: loading settings :: file = /home/hep/hadoop/ivy/ivysettings.xml

ivy-resolve-common:
[ivy:resolve] :: resolving dependencies :: org.apache.hadoop#streaming;working@hep-ubuntu
[ivy:resolve] 	confs: [common]
[ivy:resolve] 	found commons-cli#commons-cli;1.2 in maven2
[ivy:resolve] 	found commons-logging#commons-logging;1.0.4 in maven2
[ivy:resolve] 	found junit#junit;4.5 in maven2
[ivy:resolve] 	found org.mortbay.jetty#jetty-util;6.1.26 in maven2
[ivy:resolve] 	found org.mortbay.jetty#jetty;6.1.26 in maven2
[ivy:resolve] 	found org.mortbay.jetty#servlet-api;2.5-20081211 in maven2
[ivy:resolve] 	found asm#asm;3.2 in maven2
[ivy:resolve] 	found com.sun.jersey#jersey-core;1.8 in maven2
[ivy:resolve] 	found com.sun.jersey#jersey-json;1.8 in maven2
[ivy:resolve] 	found com.sun.jersey#jersey-server;1.8 in maven2
[ivy:resolve] 	found commons-httpclient#commons-httpclient;3.0.1 in maven2
[ivy:resolve] 	found log4j#log4j;1.2.15 in maven2
[ivy:resolve] 	found commons-codec#commons-codec;1.4 in maven2
[ivy:resolve] 	found org.codehaus.jackson#jackson-mapper-asl;1.8.8 in maven2
[ivy:resolve] 	found org.codehaus.jackson#jackson-core-asl;1.8.8 in maven2
[ivy:resolve] 	found commons-configuration#commons-configuration;1.6 in maven2
[ivy:resolve] 	found commons-collections#commons-collections;3.2.1 in maven2
[ivy:resolve] 	found commons-lang#commons-lang;2.4 in maven2
[ivy:resolve] 	found commons-logging#commons-logging;1.1.1 in maven2
[ivy:resolve] 	found commons-digester#commons-digester;1.8 in maven2
[ivy:resolve] 	found commons-beanutils#commons-beanutils;1.7.0 in maven2
[ivy:resolve] 	found commons-beanutils#commons-beanutils-core;1.8.0 in maven2
[ivy:resolve] 	found org.apache.commons#commons-math;2.1 in maven2
[ivy:resolve] :: resolution report :: resolve 144ms :: artifacts dl 21ms
[ivy:resolve] 	:: evicted modules:
[ivy:resolve] 	commons-logging#commons-logging;1.0.4 by [commons-logging#commons-logging;1.1.1] in [common]
[ivy:resolve] 	commons-logging#commons-logging;1.0.3 by [commons-logging#commons-logging;1.1.1] in [common]
[ivy:resolve] 	commons-logging#commons-logging;1.1 by [commons-logging#commons-logging;1.1.1] in [common]
	---------------------------------------------------------------------
	|                  |            modules            ||   artifacts   |
	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
	---------------------------------------------------------------------
	|      common      |   25  |   0   |   0   |   3   ||   22  |   0   |
	---------------------------------------------------------------------

ivy-retrieve-common:
[ivy:retrieve] :: retrieving :: org.apache.hadoop#streaming [sync]
[ivy:retrieve] 	confs: [common]
[ivy:retrieve] 	22 artifacts copied, 0 already retrieved (6473kB/16ms)
[ivy:cachepath] DEPRECATED: 'ivy.conf.file' is deprecated, use 'ivy.settings.file' instead
[ivy:cachepath] :: loading settings :: file = /home/hep/hadoop/ivy/ivysettings.xml

compile:
     [echo] contrib: streaming
    [javac] /home/hep/hadoop/src/contrib/build-contrib.xml:191: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 36 source files to /home/hep/hadoop/build/contrib/streaming/classes
    [javac] 注: /home/hep/hadoop/src/contrib/streaming/src/java/org/apache/hadoop/streaming/StreamUtil.java使用或覆盖了已过时的 API。
    [javac] 注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
    [javac] 注: 某些输入文件使用了未经检查或不安全的操作。
    [javac] 注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。

check-contrib:

init:
     [echo] contrib: thriftfs
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/thriftfs
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/thriftfs/classes
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/thriftfs/test
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/thriftfs/system
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/thriftfs/system/classes
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/thriftfs/examples
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/thriftfs/test/logs

init-contrib:

ivy-probe-antlib:

ivy-init-antlib:

ivy-init:
[ivy:configure] :: loading settings :: file = /home/hep/hadoop/ivy/ivysettings.xml

ivy-resolve-common:
[ivy:resolve] :: resolving dependencies :: org.apache.hadoop#thriftfs;working@hep-ubuntu
[ivy:resolve] 	confs: [common]
[ivy:resolve] 	found commons-logging#commons-logging;1.0.4 in maven2
[ivy:resolve] 	found log4j#log4j;1.2.15 in maven2
[ivy:resolve] 	found commons-configuration#commons-configuration;1.6 in maven2
[ivy:resolve] 	found commons-collections#commons-collections;3.2.1 in maven2
[ivy:resolve] 	found commons-lang#commons-lang;2.4 in maven2
[ivy:resolve] 	found commons-logging#commons-logging;1.1.1 in maven2
[ivy:resolve] 	found commons-digester#commons-digester;1.8 in maven2
[ivy:resolve] 	found commons-beanutils#commons-beanutils;1.7.0 in maven2
[ivy:resolve] 	found commons-beanutils#commons-beanutils-core;1.8.0 in maven2
[ivy:resolve] 	found org.apache.commons#commons-math;2.1 in maven2
[ivy:resolve] :: resolution report :: resolve 60ms :: artifacts dl 2ms
[ivy:resolve] 	:: evicted modules:
[ivy:resolve] 	commons-logging#commons-logging;1.0.4 by [commons-logging#commons-logging;1.1.1] in [common]
[ivy:resolve] 	commons-logging#commons-logging;1.0.3 by [commons-logging#commons-logging;1.1.1] in [common]
[ivy:resolve] 	commons-logging#commons-logging;1.1 by [commons-logging#commons-logging;1.1.1] in [common]
	---------------------------------------------------------------------
	|                  |            modules            ||   artifacts   |
	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
	---------------------------------------------------------------------
	|      common      |   12  |   0   |   0   |   3   ||   9   |   0   |
	---------------------------------------------------------------------

ivy-retrieve-common:
[ivy:retrieve] :: retrieving :: org.apache.hadoop#thriftfs [sync]
[ivy:retrieve] 	confs: [common]
[ivy:retrieve] 	9 artifacts copied, 0 already retrieved (2889kB/6ms)
[ivy:cachepath] DEPRECATED: 'ivy.conf.file' is deprecated, use 'ivy.settings.file' instead
[ivy:cachepath] :: loading settings :: file = /home/hep/hadoop/ivy/ivysettings.xml

compile:
     [echo] contrib: thriftfs
    [javac] /home/hep/hadoop/src/contrib/build-contrib.xml:191: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 1 source file to /home/hep/hadoop/build/contrib/thriftfs/classes

init:
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/vaidya
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/vaidya/classes
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/vaidya/bin
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/vaidya/conf
     [copy] Copying 1 file to /home/hep/hadoop/build/contrib/vaidya/bin
     [copy] Copying 1 file to /home/hep/hadoop/build/contrib/vaidya/conf

ivy-probe-antlib:

ivy-init-antlib:

ivy-init:
[ivy:configure] :: loading settings :: file = /home/hep/hadoop/ivy/ivysettings.xml

ivy-resolve-common:
[ivy:resolve] :: resolving dependencies :: org.apache.hadoop#vaidya;working@hep-ubuntu
[ivy:resolve] 	confs: [common]
[ivy:resolve] 	found commons-logging#commons-logging;1.0.4 in maven2
[ivy:resolve] 	found log4j#log4j;1.2.15 in maven2
[ivy:resolve] :: resolution report :: resolve 13ms :: artifacts dl 1ms
	---------------------------------------------------------------------
	|                  |            modules            ||   artifacts   |
	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
	---------------------------------------------------------------------
	|      common      |   2   |   0   |   0   |   0   ||   2   |   0   |
	---------------------------------------------------------------------

ivy-retrieve-common:
[ivy:retrieve] :: retrieving :: org.apache.hadoop#vaidya [sync]
[ivy:retrieve] 	confs: [common]
[ivy:retrieve] 	2 artifacts copied, 0 already retrieved (419kB/6ms)
[ivy:cachepath] DEPRECATED: 'ivy.conf.file' is deprecated, use 'ivy.settings.file' instead
[ivy:cachepath] :: loading settings :: file = /home/hep/hadoop/ivy/ivysettings.xml

compile:
     [echo] contrib: vaidya
    [javac] /home/hep/hadoop/src/contrib/build-contrib.xml:191: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 14 source files to /home/hep/hadoop/build/contrib/vaidya/classes
    [javac] 注: /home/hep/hadoop/src/contrib/vaidya/src/java/org/apache/hadoop/vaidya/statistics/job/JobStatistics.java使用了未经检查或不安全的操作。
    [javac] 注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。

compile-ant-tasks:
    [javac] /home/hep/hadoop/build.xml:2210: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 5 source files to /home/hep/hadoop/build/ant
    [javac] 警告: [options] 未与 -source 1.6 一起设置引导类路径
    [javac] 1 个警告

compile:

BUILD SUCCESSFUL
Total time: 10 minutes 3 seconds

2.进入到%hadoop%/build/contrib/eclipse-plugin/执行 ant jar :  

hep@hep-ubuntu:~$ cd ~/hadoop/src/contrib/eclipse-plugin
hep@hep-ubuntu:~/hadoop/src/contrib/eclipse-plugin$ ant jar
Buildfile: /home/hep/hadoop/src/contrib/eclipse-plugin/build.xml

check-contrib:

init:
     [echo] contrib: eclipse-plugin

init-contrib:

ivy-probe-antlib:

ivy-init-antlib:

ivy-init:
[ivy:configure] :: Ivy 2.1.0 - 20090925235825 :: http://ant.apache.org/ivy/ ::
[ivy:configure] :: loading settings :: file = /home/hep/hadoop/ivy/ivysettings.xml

ivy-resolve-common:
[ivy:resolve] :: resolving dependencies :: org.apache.hadoop#eclipse-plugin;working@hep-ubuntu
[ivy:resolve] 	confs: [common]
[ivy:resolve] 	found commons-logging#commons-logging;1.0.4 in maven2
[ivy:resolve] 	found log4j#log4j;1.2.15 in maven2
[ivy:resolve] :: resolution report :: resolve 171ms :: artifacts dl 4ms
	---------------------------------------------------------------------
	|                  |            modules            ||   artifacts   |
	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
	---------------------------------------------------------------------
	|      common      |   2   |   0   |   0   |   0   ||   2   |   0   |
	---------------------------------------------------------------------

ivy-retrieve-common:
[ivy:retrieve] :: retrieving :: org.apache.hadoop#eclipse-plugin [sync]
[ivy:retrieve] 	confs: [common]
[ivy:retrieve] 	0 artifacts copied, 2 already retrieved (0kB/6ms)
[ivy:cachepath] DEPRECATED: 'ivy.conf.file' is deprecated, use 'ivy.settings.file' instead
[ivy:cachepath] :: loading settings :: file = /home/hep/hadoop/ivy/ivysettings.xml

compile:
     [echo] contrib: eclipse-plugin
    [javac] /home/hep/hadoop/src/contrib/eclipse-plugin/build.xml:61: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds

jar:
    [mkdir] Created dir: /home/hep/hadoop/build/contrib/eclipse-plugin/lib
     [copy] Copying 1 file to /home/hep/hadoop/build/contrib/eclipse-plugin/lib
     [copy] Copying /home/hep/hadoop/hadoop-core-1.1.2.jar to /home/hep/hadoop/build/contrib/eclipse-plugin/lib/hadoop-core.jar
     [copy] Copying 1 file to /home/hep/hadoop/build/contrib/eclipse-plugin/lib
     [copy] Copying /home/hep/hadoop/lib/commons-cli-1.2.jar to /home/hep/hadoop/build/contrib/eclipse-plugin/lib/commons-cli-1.2.jar
     [copy] Copying 1 file to /home/hep/hadoop/build/contrib/eclipse-plugin/lib
     [copy] Copying /home/hep/hadoop/lib/commons-configuration-1.6.jar to /home/hep/hadoop/build/contrib/eclipse-plugin/lib/commons-configuration-1.6.jar
     [copy] Copying 1 file to /home/hep/hadoop/build/contrib/eclipse-plugin/lib
     [copy] Copying /home/hep/hadoop/lib/commons-httpclient-3.0.1.jar to /home/hep/hadoop/build/contrib/eclipse-plugin/lib/commons-httpclient-3.0.1.jar
     [copy] Copying 1 file to /home/hep/hadoop/build/contrib/eclipse-plugin/lib
     [copy] Copying /home/hep/hadoop/lib/commons-lang-2.4.jar to /home/hep/hadoop/build/contrib/eclipse-plugin/lib/commons-lang-2.4.jar
     [copy] Copying 1 file to /home/hep/hadoop/build/contrib/eclipse-plugin/lib
     [copy] Copying /home/hep/hadoop/lib/jackson-core-asl-1.8.8.jar to /home/hep/hadoop/build/contrib/eclipse-plugin/lib/jackson-core-asl-1.8.8.jar
     [copy] Copying 1 file to /home/hep/hadoop/build/contrib/eclipse-plugin/lib
     [copy] Copying /home/hep/hadoop/lib/jackson-mapper-asl-1.8.8.jar to /home/hep/hadoop/build/contrib/eclipse-plugin/lib/jackson-mapper-asl-1.8.8.jar
      [jar] Building jar: /home/hep/hadoop/build/contrib/eclipse-plugin/hadoop-eclipse-plugin-1.1.2.jar

BUILD SUCCESSFUL
Total time: 3 seconds


生成的插件jar的位置如上面第60行代码所示。
成品下载:http://download.csdn.net/detail/vigiles/5437791

本人生成的成品(hadoop1.2.1):http://download.csdn.net/detail/scorpiohjx2/6856899


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值