环境:eclipse-jee-mars-2-win32-x86_64(maven插件自带)
1.maven下载
这里以apache-maven-3.2.2-bin.tar示例,
具体下载链接:http://pan.baidu.com/s/1geRAykj 密码:egct
2.在windows下配置环境变量:MAVEN_HOME 和 path
3.cmd下 ,mvn -v 检查安装是否成功
4.在 eclipse 中配置 maven
将 maven 的配置文件路径配置在 eclipse 中 Maven 的 jar 库的库默认配置在 c 盘中,为了节省系统盘的空间,可以将 jar 配置在其他盘,需要修改
接着在eclipse中 windows--preferences--maven--user settings设置如下:
5.点击 Window -> Preference -> Maven -> Installation -> Add 进行设置
6.Eclipse 配置 hadoop 插件及 hadoop Eclipse 的插件(64位windows系统下)
hadoop-2.2.0-x64.tar
链接:http://pan.baidu.com/s/1o83VNnW 密码:cknp
hadoop-eclipse-plugin-2.2.0
链接:http://pan.baidu.com/s/1jIRK5E2 密码:rclf
6(1)首先将hadoop-eclipse-plugin-2.2.0放入 D:\software_hadoop\eclipse-jee-mars-2-win32-x86_64\eclipse\plugins下,重启eclipse
6(2)导入hadoop2.2.0
7.Eclipsp 中创建 Maven Handoop 工程
8.Maven Pom.xml 文件中配置 hadoop jar 包

1 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3 <modelVersion>4.0.0</modelVersion>
4
5 <groupId>com.chynn.dashuju</groupId>
6 <artifactId>recommend</artifactId>
7 <version>6.1.0-SNAPSHOT</version>
8 <packaging>jar</packaging>
9
10 <name>recommend</name>
11 <url>http://maven.apache.org</url>
12
13 <properties>
14 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15 </properties>
16
17 <dependencies>
18 <dependency>
19 <groupId>junit</groupId>
20 <artifactId>junit</artifactId>
21 <version>3.8.1</version>
22 <scope>test</scope>
23 </dependency>
24 <dependency>
25 <groupId>org.apache.hadoop</groupId>
26 <artifactId>hadoop-client</artifactId>
27 <version>2.2.0</version>
28 </dependency>
29 <dependency>
30 <groupId>org.apache.hadoop</groupId>
31 <artifactId>hadoop-common</artifactId>
32 <version>2.2.0</version>
33 </dependency>
34 <dependency>
35 <groupId>org.apache.hadoop</groupId>
36 <artifactId>hadoop-hdfs</artifactId>
37 <version>2.2.0</version>
38 </dependency>
39 <dependency>
40 <groupId>org.apache.hbase</groupId>
41 <artifactId>hbase-server</artifactId>
42 <version>0.98.3-hadoop2</version>
43 <exclusions>
44 <exclusion>
45 <artifactId>hadoop-common</artifactId>
46 <groupId>org.apache.hadoop</groupId>
47 </exclusion>
48 </exclusions>
49 </dependency>
50 <dependency>
51 <groupId>org.apache.hbase</groupId>
52 <artifactId>hbase-client</artifactId>
53 <version>0.98.3-hadoop2</version>
54 <exclusions>
55 <exclusion>
56 <artifactId>hadoop-common</artifactId>
57 <groupId>org.apache.hadoop</groupId>
58 </exclusion>
59 </exclusions>
60 </dependency>
61 <dependency>
62 <groupId>jdk.tools</groupId>
63 <artifactId>jdk.tools</artifactId>
64 <version>1.7</version>
65 <scope>system</scope>
66 <systemPath>${JAVA_HOME}/lib/tools.jar</systemPath>
67 </dependency>
68 </dependencies>
69 </project>
