之前没用过IDEA,最近因为要跑一个推荐系统模型,线上部分都是java代码,用IEDA时发现即使import项目选了maven,后面还是识别不了maven项目(run不了),于是乎找到本地项目的pom.xml文件,右键点击maven的reinport后又发现速度是真滴龟速,折腾下发现可以通过设置阿里源仓库提速:
(1)idea设置Maven仓库阿里云镜像
(2)idea设置Maven仓库阿里云镜像,是1的浓缩版,但是有些步骤的字漏了,比如找到settings.xml的
aliyunmaven * 阿里云公共仓库 https://maven.aliyun.com/repository/public
感觉ok了,但是再reimport那个maven后报错如下,我直呼好家伙。
Could not transfer artifact org.apache.hadoop:hadoop-client:jar:2.7.2 from/to central
查了这篇博客(彻底解决Could not transfer artifact org.apache.maven.plugins问题)后发现前两步都做了,但是如果还不行的话需要对setting文件的importing添加一句东西,文件的importing没找到,就直接到文件栏:file,setting找:
加上这句-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true是为了解决证书问题,这样妈妈就不用担心你报错Could not transfer artifact org.apache.hadoop了,然后就可以加载该maven项目依赖的包,最后run下就芜湖,起飞!
(1)https://blog.csdn.net/weixin_44218060/article/details/103799389
(2)彻底解决Could not transfer artifact org.apache.maven.plugins问题



