1, first in eclipse-"help-" Eclipse Marketplace search maven plugin download.
Note that the plugin will correspond to the eclipse version, my eclipse version is Luna, the plugin will download the Luna version, I downloaded Maven integration for Eclipse (Luna and newer) 1.5. Otherwise, the new MAVEN project did not bring Java engineering.
2, other environment configuration and Hadoop configuration see the reference link.
3, I use is hadoop2.4.0. The pom file is as follows:
<project xmlns= "http://maven.apache.org/POM/4.0.0" xmlns:xsi= "http://www.w3.org/2001/ Xmlschema-instance "xsi:schemalocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/ Maven-4.0.0.xsd "><modelversion>4.0.0</modelversion><groupid>com.rsclouds.hadoop</ groupid><artifactid>wordcount</artifactid><version>0.0.1-snapshot</version>< Packaging>jar</packaging><name>wordcount</name><url>http://maven.apache.org</url ><properties><project.build.sourceencoding>utf-8</project.build.sourceencoding></ properties><dependencies><dependency><groupid>org.apache.hadoop</groupid>< artifactid>hadoop-client</artifactid><version>2.4.0</version></dependency>< Dependency><groupid>org.apache.hadoop</groupid><artifactid>hadoop-mapreduce-client-core </artifactid><version>2.4.1</version&gT;</dependency><dependency><groupid>org.apache.hadoop</groupid><artifactid> hadoop-hdfs</artifactid><version>2.4.1</version></dependency><dependency>< Groupid>org.apache.hbase</groupid><artifactid>hbase-client</artifactid><version> 0.98.0-hadoop2</version></dependency><dependency><groupid>org.apache.hbase</groupid ><artifactid>hbase-server</artifactid><version>0.98.0-hadoop2</version></ Dependency><dependency><groupid>org.apache.hbase</groupid><artifactid>hbase-server </artifactId><version>0.98.0-hadoop2</version></dependency><dependency>< Groupid>junit</groupid><artifactid>junit</artifactid><version>3.8.1</version> <scope>test</scope></dependency></dependencies><build><pluginManagement> <plugins><plugin><groUpid>org.eclipse.m2e</groupid><artifactid>lifecycle-mapping</artifactid><version> 1.0.0</version><configuration><lifecyclemappingmetadata><pluginexecutions>< pluginexecution><pluginexecutionfilter><groupid>org.apache.maven.plugins</groupid>< artifactid>maven-dependency-plugin</artifactid><versionrange>[2.0,) </versionRange>< Goals><goal>copy-dependencies</goal></goals></pluginexecutionfilter><action> <ignore /></action></pluginexecution></pluginexecutions></ lifecyclemappingmetadata></configuration></plugin></plugins></pluginmanagement>< Plugins><plugin><groupid>org.apache.maven.plugins</groupid><artifactid> maven-dependency-plugin</artifactid><executions><execution><id>copy-dependencies</ Id><phase>package</phase><goals><goal>copy-dependencies</goal></goals><configuration><outputdirectory>lib</ outputdirectory><overwritereleases>false</overwritereleases><overwritesnapshots>false< /overwritesnapshots><overwriteifnewer>true</overwriteifnewer></configuration></ Execution></executions></plugin></plugins></build></project>
Reference: http://blog.fens.me/hadoop-maven-eclipse/
This article is from the "Cabbage" blog, please be sure to keep this source http://dreamylights.blog.51cto.com/1163218/1591650
Win7+eclipse using MAVEN to build Hadoop project considerations