Reputation: 8855
i am simply trying to reference the hadoop mapreduce jar in my maven project. i see that the way to do so is posted at http://mvnrepository.com/artifact/org.apache.hadoop/hadoop-mapreduce/2.3.0.
my pom has the following dependency.
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-mapreduce</artifactId>
<version>2.3.0</version>
</dependency>
however, in eclipse, i see the following errors.
C:\Users\root\.m2\repository\org\apache\hadoop\hadoop-mapreduce\2.3.0\hadoop-mapreduce-2.3.0.jar
org.apache.hadoop:hadoop-mapreduce:jar:2.3.0
how to reference hadoop v2.3.0 jars in maven?
when i type in the following command
mvn clean install -e -X -U
i see the following output
Could not find artifact org.apache.hadoop:hadoop-mapreduce:jar:2.3.0 in central (http://repo.maven.apache.org/maven2)
any idea on what's going on here?
by the way, my ~/.m2/settings.xml
has not been "tampered" with. it's still the default one that's placed there.
here's some information on my maven version.
mvn -version
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 08:51:28-0500)
Maven home: C:\Program Files (x86)\apache-maven-3.0.5\bin\..
Java version: 1.7.0_13, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_13\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 8", version: "6.2", arch: "amd64", family: "windows"
any help is appreciated.
Upvotes: 1
Views: 2286
Reputation: 1810
This works (Notice type is pom as this is container for other modules):
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-mapreduce</artifactId>
<version>2.3.0</version>
<scope>provided</scope>
<type>pom</type>
</dependency>
But usually for development i use (it packages all relevant dependencies):
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>2.3.0</version>
<scope>provided</scope>
<type>jar</type>
</dependency>
Upvotes: 3