maven报错 Missing artifact jdk.tools:jdk.tools:jar:1.8解决方案

版权声明:版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/a458383896/article/details/87992461

在eclipse中建立Maven项目,遇到了Missing artifact jdk.tools:jdk.tools:jar:1.8。其他也没有报错,一脸懵逼。

当我看到了这里:

原因:tools.jar包是JDK自带的,pom.xml中以来的包隐式依赖tools.jar包,而tools.jar并未在库中,

解决方案:在pom文件中添加如下代码即可。

<groupId>jdk.tools</groupId>
    <artifactId>jdk.tools</artifactId>
    <version>1.8</version>
    <scope>system</scope>
    <systemPath>${JAVA_HOME}/lib/tools.jar</systemPath>
</dependency>
	<dependency>
	    <groupId>com.sun.jersey</groupId>
	    <artifactId>jersey-server</artifactId>
	    <version>1.8</version>
	</dependency>

猜你喜欢

转载自blog.csdn.net/a458383896/article/details/87992461
今日推荐