Maven引入Hadoop依賴報錯:Missing artifact jdk.tools:jdk.tools:jar:1.6
阿新 • • 發佈:2017-05-24
cor java style 2.4 iss art java_home mapr 問題
Maven引入Hadoop依賴報錯:Missing artifact jdk.tools:jdk.tools:jar:1.6
原因是缺少tools.jar的依賴,tools.jar在jdk的安裝目錄中提供了,所以改成如下形式解決此問題:
添加依賴
<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>
Maven引入Hadoop依賴報錯:Missing artifact jdk.tools:jdk.tools:jar:1.6