maven使用问题总结

JAVA学习网 2019-08-14 19:07:45

maven dependencies 报红叉的问题:

第一种:检查bulid path 里面maven dependencies 是否丢失包 miss jar。

解决方法1:https://blog.csdn.net/st75033562/article/details/82978775

 

解决方法2:右键项目选择Run As——>Maven install; 自动下载丢失的jar包;

此时若还有丢失的jar包,手动到pom文件里面添加maven依赖下载,最好 maven---update:

 

第二种:检查:window------preferences-----maven---- user settings 和 installations 配置了没。如图:

 

 

二: 在eclipse中,如果你不小心在properties=>Java Build Path中将Maven Dependencies Libraries 移除了怎么恢复呢? 

解决办法:1.右键你的项目->Maven->Update Project Configuration更新完后,进行第二步 
            2.右键你的项目->Properties=>Deployment Assembly=>Add=>java Build Path Entries =>Maven Dependencies=>finish就OK啦。

 

阅读(2411) 评论(0)