Maven报错#Could not transfer artifact (https:repo.maven.apache.org/maven2):Received fatal alert:procol

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/daoerZ/article/details/85009337

Maven构建项目报错:Could not transfer artifact https:repo.maven.apache.org/maven2:Received fatal alert:protocol_version->[Help 1]

RT
最初以为是本地网络状态不好,在确认网络良好的情况下构建项目,多次maven-install后,依然报这个错。只能求助度娘,试了几种方法都用不了,最好才找到原因:中央仓库必须要TLS1.2版本才能访问,有两种解决方法:

一、将JDK版本升级到jdk1.8,因为在1.8及以上版本,才会默认使用TLS1.2。

二、maven的配置文件setting.xml中设置为阿里云私服,设置方式可在度娘里查。

猜你喜欢

转载自blog.csdn.net/daoerZ/article/details/85009337