java - Buiding Hadoop with Eclipse / Maven - Missing artifact jdk.tools:jdk.tools:jar:1.6 -
i trying import cloudera's org.apache.hadoop:hadoop-client:2.0.0-cdh4.0.0 from cdh4 maven repo in maven project in eclipse 3.81, m2e plugin, oracle's jdk 1.7.0_05 on win7 using
<dependency> <groupid>org.apache.hadoop</groupid> <artifactid>hadoop-client</artifactid> <version>2.0.0-cdh4.0.0</version> </dependency>
however, following error:
the container 'maven dependencies' references non existing library 'c:\users\myuserid\.m2\repository\jdk\tools\jdk.tools\1.6\jdk.tools-1.6.jar'
more specific, maven states following artifact missing
missing artifact jdk.tools:jdk.tools:jar:1.6
how solve this?
jdk.tools:jdk.tools
(or com.sun:tools
, or whatever name it) jar file distributed jdk. add maven projects this:
<dependency> <groupid>jdk.tools</groupid> <artifactid>jdk.tools</artifactid> <scope>system</scope> <systempath>${java.home}/../lib/tools.jar</systempath> </dependency>
see, maven faq adding dependencies tools.jar
or, can manually install tools.jar
in local repository using:
mvn install:install-file -dgroupid=jdk.tools -dartifactid=jdk.tools -dpackaging=jar -dversion=1.6 -dfile=tools.jar -dgeneratepom=true
and reference cloudera did, using:
<dependency> <groupid>jdk.tools</groupid> <artifactid>jdk.tools</artifactid> <version>1.6</version> </dependency>
Comments
Post a Comment