码迷,mamicode.com
首页 > 编程语言 > 详细

开发常见错误之 :Missing artifact com.sun:tools:jar 1.7.0

时间:2017-07-30 11:33:37      阅读:573      评论:0      收藏:0      [点我收藏+]

标签:com   1.7   title   color   nts   logs   改名   tle   blank   

Missing artifact com.sun:tools:jar 1.7.0

解决办法一:

手动配置pom.xml,添加一个dependency如下:

<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<scope>system</scope>
<systemPath>${JAVA_HOME}/../lib/tools.jar</systemPath>
</dependency>

即可!

如果办法不能解决,试用第二种方法。

解决办法二:

首先,查看错误列表windows->Show View->Problems,在有以上问题的同时,还会出现该错误。
The Container ‘Maven Dependencies‘ references non existing library ‘C:\Documents and Settings\DELL\.m2\repository\com\sun\tools\1.7.0\tools-1.7.0.jar‘
大致说:找不到该tools-1.7.0.jar。

所以将C:\Program Files\Java\jdk1.7.0_10\lib\目录下的tools.jar拷贝到C:\Documents and Settings\DELL\.m2\repository\com\sun\tools\1.7.0\目录下,并将tools.jar改名为tools-1.7.0.jar,并在pom.xml中作如下配置:

<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.7.0</version>
</dependency>

 

开发常见错误之 :Missing artifact com.sun:tools:jar 1.7.0

标签:com   1.7   title   color   nts   logs   改名   tle   blank   

原文地址:http://www.cnblogs.com/sunfie/p/7258461.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!