maven项目出现 Missing artifact jdk.tools:jdk.tools:jar:1.7

导入的  maven项目出现   Missing artifact jdk.tools:jdk.tools:jar:1.7 

原因:大多数原因是maven项目找不到系统内的jdk1.7,根本原因是没有指定javaw.exe的位置导致的.

解决办法:这里做一个处理,就是直接在pom.xml文件里面添加一个依赖

<dependency>  
    <groupId>jdk.tools</groupId>  
    <artifactId>jdk.tools</artifactId>  
    <version>1.7</version>  
    <scope>system</scope>  
    <systemPath>${JAVA_HOME}/lib/tools.jar</systemPath>  
</dependency>  

 制作: mynameisyaxuan

猜你喜欢

转载自blog.csdn.net/mynameisyaxuan/article/details/78766707