Maven introduces Hadoop dependency error: Missing artifact jdk.tools:jdk.tools:jar:1.6
The reason is that the Tools.jar dependency is missing and Tools.jar is available in the JDK installation directory, so it is changed to the following form to resolve this issue:
Add dependency
<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 introduces Hadoop dependency error: Missing artifact jdk.tools:jdk.tools:jar:1.6