1、首先在Eclipse-》help-》Eclipse marketplace 搜索 maven 插件下载。
注意插件要与Eclipse版本对应,我的Eclipse版本为Luna的,插件就要下载Luna版本的,我下载的是 Maven Integration for Eclipse (Luna and newer) 1.5。否则的话新建maven工程的时候没有带Java工程。
2、其他环境配置和hadoop配置见参考链接。
3、我使用的是hadoop2.4.0. pom文件如下:
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.rsclouds.hadoop
wordcount
0.0.1-SNAPSHOT
jar
wordcount
http://maven.apache.org
UTF-8
org.apache.hadoop
hadoop-client
2.4.0
org.apache.hadoop
hadoop-mapreduce-client-core
2.4.1
org.apache.hadoop
hadoop-hdfs
2.4.1
org.apache.hbase
hbase-client
0.98.0-hadoop2
org.apache.hbase
hbase-server
0.98.0-hadoop2
org.apache.hbase
hbase-server
0.98.0-hadoop2
junit
junit
3.8.1
test
org.eclipse.m2e
lifecycle-mapping
1.0.0
org.apache.maven.plugins
maven-dependency-plugin
[2.0,)
copy-dependencies
org.apache.maven.plugins
maven-dependency-plugin
copy-dependencies
package
copy-dependencies
lib
false
false
true