Maven搭建hadoop环境报Missing artifact jdk.tools:jdk.tools:jar:1.8

来源:互联网 发布:php curl get 传参数 编辑:程序博客网 时间:2024/06/06 05:39

使用Maven搭建hadoop环境,在pom.xml中报错:Missing artifact jdk.tools:jdk.tools:jar:1.8

问题原因:没有配置jdk中tools.jar

解决方法:

在pom.xml中添加如下配置

<dependency><groupId>org.apache.hadoop</groupId><artifactId>hadoop-mapreduce-client-core</artifactId><version>2.7.1</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.8</version><scope>system</scope><systemPath>${JAVA_HOME}/lib/tools.jar</systemPath></dependency>

0 0
原创粉丝点击