Compile - Integrated hadoop-eclipse-plugin to eclipse

0), the software is ready
following software no special instructions are windows platform
hadoop2.7.5
jdk1.8
the Eclipse platform, any version of windows
hadoop2x-eclipse-plugin package downloaded from github (if the project is too slow can be cloned into a cloud and then download the code)
ant- 1.10.7

1), the compiler ready to
modify hadoop2x-eclipse-plugin unzip directory src \ contrib \ eclipse-plugin \ build.xml.
<path id = "eclipse-sdk -jars">

<Fileset dir = "C: \ Users \ Administrator \ .p2 \ pool \ plugins"> eclipseui resource directory is the directory may eclipse \ configuration in that specific category by config.ini

<target name = "compile" depends = "ivy-init, ivy-resolve-common" unless = "skip.contrib"> attribute depends deleted
then javac plus tag includeantruntime = "on"

找到copy标签然后添加以下3行:
<copy file="${hadoop.home}/share/hadoop/common/lib/servlet-api-${servlet-api.version}.jar" todir="${build.dir}/lib" verbose="true"/>
<copy file="${hadoop.home}/share/hadoop/common/lib/commons-io-${commons-io.version}.jar" todir="${build.dir}/lib" verbose="true"/>
<copy file="${hadoop.home}/share/hadoop/common/lib/netty-${netty.version}.jar" todir="${build.dir}/lib" verbose="true"/>

Enter hadoop2x-eclipse-plugin unzip directory src \ contrib \ eclipse-plugin directory.
Modify hadoop2x-eclipse-plugin unzip directory ivy \ libraries.properties.
hadoop.version: hadoop version number.
apacheant.version: ant version number.
netty.version: hadoop packet corresponding version number of the file.
commons-io.version: hadoop packet corresponding version number of the file.
servlet-api.version: hadoop packet corresponding version number of the file.

2) to begin compiling
execution JAR -Dversion = 2.7.5 -Declipse.home Ant = D: \ the Eclipse -Dhadoop.home = G: \ codeprogram \ hadoop-2.7.5
-Dversion: plug-in version.
-Declipse.home: eclipse installation directory.
-Dhadoop.home: hadoop extracted directory.
The modified copy given hadoop2x-eclipse-plugin codecs directory ivy \ libraries.properties corresponding version number.
corresponding resource needs and libraries.properties label copy versions.


3) the introduction of plug-
compiled after the success of plug-in generation, copy the plug after dropins and plugins directory under the eclipse directory to restart eclipse can be based on the command line prompt directory.

Error Summary:
0 high version of the eclipse (my current version is not updated 2018) own plugin package addresses in the configuration file, you need to modify 'fileset' or it will eclipse javac compiler error or can not find the specified address the corresponding packet.

1 ivy-resolve-common stuck actually download the corresponding packages to the repository plus -debug can view the download progress at the command just as you compile the plug from the deletion of the corresponding property maven repository can

2 copy label find the version number to extract ivy \ libraries.properties priority under the root directory

3 high version eclipse plug-in to dropins need to copy and plugins directory under the eclipse directory or the introduction of plug-ins fail

lib配置
hadoop.version=2.7.5
hadoop-gpl-compression.version=0.1.0

#These are the versions of our dependencies (in alphabetical order)
apacheant.version=1.10.6
ant-task.version=2.0.10

asm.version=3.2
aspectj.version=1.6.5
aspectj.version=1.6.11

checkstyle.version=4.2

commons-cli.version=1.2
commons-codec.version=1.4
commons-collections.version=3.1
commons-configuration.version=1.6
commons-daemon.version=1.0.13
commons-httpclient.version=3.0.1
commons-lang.version=2.6
commons-logging.version=1.0.4
commons-logging-api.version=1.0.4
commons-math.version=2.1
commons-el.version=1.0
commons-fileupload.version=1.2
commons-io.version=2.1
commons-net.version=3.1
core.version=3.1.1
coreplugin.version=1.3.2

hsqldb.version=1.8.0.10

ivy.version=2.1.0

jasper.version=5.5.12
jackson.version=1.8.8
#not able to figureout the version of jsp & jsp-api version to get it resolved throught ivy
# but still declared here as we are going to have a local copy from the lib folder
jsp.version=2.1
jsp-api.version=5.5.12
jsp-api-2.1.version=6.1.14
jsp-2.1.version=6.1.14
jets3t.version=0.6.1
jetty.version=6.1.26
jetty-util.version=6.1.26
jersey-core.version=1.8
jersey-json.version=1.8
jersey-server.version=1.8
junit.version=4.5
jdeb.version=0.8
jdiff.version=1.0.9
json.version=1.0

kfs.version=0.1

log4j.version=1.2.15
lucene-core.version=2.3.1

mockito-all.version=1.8.5
jsch.version=0.1.42

oro.version=2.0.8

rats-lib.version=0.5.1

servlet.version=4.0.6
servlet-api.version=2.5
slf4j-api.version=1.4.3
slf4j-log4j12.version=1.4.3

wagon-http.version=1.0-beta-2
xmlenc.version=0.52
xerces.version=1.4.4

Guess you like

Origin www.cnblogs.com/nit-k/p/12601972.html