Created on 12-23-2013 12:10 PM - edited 09-16-2022 01:51 AM
Hi ,
I am facing one issue on downloading hadoop jar files through pom.xml ,Need a little help from you .
Below is the changes I made in pom.xml for adding hadoop jar files
<!-- Adding for Hadoop repositories -->
<repositories>
<repository>
<id>maven-hadoop</id>
<name>Hadoop Releases</name>
<url>https://repository.cloudera.com/content/repositories/releases/</url>
</repository>
<repository>
<id>cloudera-repos</id>
<name>Cloudera Repos</name>
<url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
</repository>
<!-- Ended here -->
</repositories>
Under Dependencies, I added the below
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>2.0.0-cdh4.3.0</version>
</dependency>
</dependencies>
But still giving error in pom.xml as below
Missing artifact org.apache.hadoop:hadoop-client:jar:2.0.0-cdh4.3.0
Also tried with below dependency with SNAPSHOT
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>2.0.0-cdh4.3.0-SNAPSHOT</version>
</dependency>
</dependencies>
I could see that the both artifacts are available in cloudera repository
Can you please throw some idea on what to do to get out of this error, so that my pom.xml will compile and download jar files.
I referred to below example as reference for configure my hadoop in pom.xml
http://blog.cloudera.com/blog/2012/12/how-to-run-a-mapreduce-job-in-cdh4/
Thanks
Rajasekhar
Created 12-23-2013 12:17 PM
jdk.tools:jdk.tools (or com.sun:tools, or whatever you name it) is a JAR file that is distributed with JDK. Usually you add it to maven projects like this:
<dependency>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
<scope>system</scope>
<systemPath>${JAVA_HOME}/../lib/tools.jar</systemPath>
</dependency>
Or, you can manually install tools.jar in the local repository using:
mvn install:install-file -DgroupId=jdk.tools -DartifactId=jdk.tools -Dpackaging=jar -Dversion=1.6 -Dfile=tools.jar -DgeneratePom=true
and then reference it like Cloudera did, using:
<dependency>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
<version>1.6</version>
</dependency>
Created 12-23-2013 12:17 PM
jdk.tools:jdk.tools (or com.sun:tools, or whatever you name it) is a JAR file that is distributed with JDK. Usually you add it to maven projects like this:
<dependency>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
<scope>system</scope>
<systemPath>${JAVA_HOME}/../lib/tools.jar</systemPath>
</dependency>
Or, you can manually install tools.jar in the local repository using:
mvn install:install-file -DgroupId=jdk.tools -DartifactId=jdk.tools -Dpackaging=jar -Dversion=1.6 -Dfile=tools.jar -DgeneratePom=true
and then reference it like Cloudera did, using:
<dependency>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
<version>1.6</version>
</dependency>