Missing artifact com.sun:tools:jar:1.5.0解决的方法
前一阵子下了最新的JavaEE版本号的eclipse,导入mavenproject之后,pom文件一直报Missing artifact com.sun:tools:jar:1.5.0。非常纳闷,tools.jar是jdk自带的jar包。查了一下pom依赖图,原来是struts-core依赖了这个jar包。
试了网上的各种方法,仅仅有把jdk的tools.jar拷贝到本地仓库,报错才消失。
详细解决的方法例如以下:
把D:\Program Files (x86)\Java\jdk1.6.0_10\lib\tools.jar文件拷贝到maven本地仓库,并改名字。改成tools-1.5.0.jar。然后为这个jar包编写pom文件:
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><modelVersion>4.0.0</modelVersion><groupId>com.sun</groupId><artifactId>tools</artifactId><version>1.5.0</version>
</project>
最后在报错的pom.xml文件中头加入对应的maven依赖:
<dependency><groupId>com.sun</groupId><artifactId>tools</artifactId><version>1.5.0</version></dependency>
这样pom文件就不报错了。
Missing artifact com.sun:tools:jar:1.5.0解决的方法相关推荐
- 开发常见错误之 :Missing artifact com.sun:tools:jar 1.7.0
Missing artifact com.sun:tools:jar 1.7.0 解决办法一: 手动配置pom.xml,添加一个dependency如下: <dependency> < ...
- Missing artifact com.sun:tools:jar:1.5.0
1. eclipse 突然爆出这种错误,来看看解决方案 原因:这是由于eclipse会默认使用自己的JAVA_HOME.因此才会包Missing artifact com.sun:tools:jar: ...
- 解决Missing artifact com.sun:tools:jar:1.5.0方法
今天在pom文件里加了,然后项目就报Missing artifact com.sun:tools:jar:1.5.0错误了. 解决方法如下,在pom文件里加入 然后在加入tools依赖: 完美解决! ...
- 【Java开发问题】对象封装+固定排序+list All elements are null引起的异常处理+Missing artifact com.sun:tools:jar:1.8.0
why 开发问题并不是经常遇到的,有技术问题,也有业务问题,记录一下,以备不时之需. 1 对象封装 将B类型的对象封装成A类型的对象,常用于Map对象封装成Entity对象,这里有Gson和JSON两 ...
- Eclipse maven工程 Missing artifact com.sun:tools:jar:1.5.0:system 解决方法
今天同事在使用eclipse,引入一个新的maven工程时报错: Missing artifact com.sun:tools:jar:1.6.0:system 这个问题很奇怪,相同的代码,运行到我本 ...
- Could not find artifact com.sun:tools:jar:1.5.0 解决办法
2019独角兽企业重金招聘Python工程师标准>>> Could not find artifact com.sun:tools:jar:1.5.0 解决办法 创建maven项目出 ...
- Missing artifact com.sun tools.jar 1.5.0 system 解决方法
解决:maven中引用JDK中的tools.jar 方案一 通过maven获取运行时参数,eclipse提供的环境变量,基本类似System.getProperty("java.home&q ...
- Missing artifact com.sun:tools:jar 1.5.0 终极解决方法
http://hw1287789687.iteye.com/blog/1946396 转载于:https://www.cnblogs.com/sj521/p/5950602.html
- Could not find artifact com.sun:tools:jar:1.5.0
问题: Failed to execute goal on project petroleum: Could not resolve dependencies for project petroleu ...
最新文章
- OLAP是什么意思?
- Android Studio配置GreenDAO 3.2.0和使用方法
- We will be discontinuing the Nitrous Development Platform and Cloud IDE on November 14th, 2016.
- mysql什么情况会刷脏页_mysql-刷脏页(12)
- IE下 显示图片会多出一个边框的问题
- Linux设备驱动01:Linux设备驱动概述
- 开公司的两个方向,要么把公司开成很赚钱,要么把公司做成很值钱
- pat1091. Acute Stroke (30)
- (八)ASP.NET自定义用户控件(1)
- Android Studio and Gradle are using different locations for the JDK
- 出现红字是电脑问题吗_婚姻出现问题,生个孩子就能解决,这是真的吗?
- python中正则表达式_Python中正则表达式详解
- 机器数.原码 反码 补码比较理解
- Java8 Stream新特性详解及实战
- python微信聊天机器人_Python搭建一个微信聊天机器人
- excel表格中怎样让某一行数据一直显示
- camille mumu 模拟器 frida 踩坑记录
- 网站pv和uv比例多少合适
- JavaScript---网络编程(12)--DHTML技术演示(5)-form表单验证技术(正则)
- 软件自动升级解决方案(一)
热门文章
- Kafka性能测试实例
- Java中什么时候使用extends,什么时候使用implements?
- Android 升级到Android Studio2.2 后打不开以前版本的项目
- 删除linux系统中的eth0.bak与多余的网卡
- Linux 命令(129)—— passwd 命令
- db2执行sql脚本
- ARP-地址解析协议
- 【转载】 C#中使用int.TryParse方法将字符串转换为整型Int类型
- K8s运行dashboard命令启动报错:no endpoints available for service \kubernetes-dashboard\
- 洛谷2486 【SDOI2011】染色(线段树+树链剖分)