Maven搭建hadoop环境报Missing artifact jdk.tools:jdk.tools:jar:1.6
转http://blog.csdn.net/honglei915/article/details/38087959Maven引入Hadoop依赖报错:Missing artifact jdk.tools:jdk.tools:jar:1.6
view plaincopyhttp://onexin.iyunv.com/source/plugin/onexin_bigdata/https://code.csdn.net/assets/CODE_ico.pnghttp://onexin.iyunv.com/source/plugin/onexin_bigdata/https://code.csdn.net/assets/ico_fork.svg
[*]<dependency>
[*] <groupId>org.apache.hadoop</groupId>
[*] <artifactId>hadoop-mapreduce-client-core</artifactId>
[*] <version>2.4.0</version>
[*]</dependency>
原因是缺少tools.jar的依赖,tools.jar在jdk的安装目录中提供了,所以改成如下形式解决此问题:
view plaincopyhttp://onexin.iyunv.com/source/plugin/onexin_bigdata/https://code.csdn.net/assets/CODE_ico.pnghttp://onexin.iyunv.com/source/plugin/onexin_bigdata/https://code.csdn.net/assets/ico_fork.svg
[*]<dependency>
[*] <groupId>org.apache.hadoop</groupId>
[*] <artifactId>hadoop-mapreduce-client-core</artifactId>
[*] <version>2.4.0</version>
[*] <exclusions>
[*] <exclusion>
[*] <groupId>jdk.tools</groupId>
[*] <artifactId>jdk.tools</artifactId>
[*] </exclusion>
[*] </exclusions>
[*]</dependency>
[*]<dependency>
[*] <groupId>jdk.tools</groupId>
[*] <artifactId>jdk.tools</artifactId>
[*] <version>1.6</version>
[*] <scope>system</scope>
[*] <systemPath>${JAVA_HOME}/lib/tools.jar</systemPath>
[*]</dependency>
页:
[1]