Maven Fatal alert: protocol_version

半世苍凉 提交于 2020-12-15 05:36:11

问题


I have a problem with Maven. I use as environment

  • Windows 10

  • Java SE JDK Version 8 update 80

  • Eclipse Mars 2 with M2Eclipse

  • Maven 3.5.4

I try to use any of the two but the protocol_version error arises. enable TLS 1.2 in the java application. But it does not work.

I was looking at this solution:

  • Why am I getting "Received fatal alert: protocol_version" or "peer not authenticated" from Maven Central?

but I do not understand how to make the addition of -Dhttps.protocols = TLSv1.2. no where is it made.

thank you very much for your time, excuse my english


回答1:


I followed this post and the issue was solved. You should try to add the parameter "-Dhttps.protocols=TLSv1.2" in your command and try.




回答2:


but I do not understand how to make the addition of -Dhttps.protocols = TLSv1.2. no where is it made

This depends on how you're building your Application.

A : if you're building with Eclipse Run button, you'll have to edit Run Configuration (of maven build) as shown below. (nb. you will NOT enter -D here)

B : If you're running build command line on your windows console, you can run argument right after your maven build goals

mvn clean install -Dhttps.protocols = TLSv1.2

See this link for more details on Command line arguments for maven build



来源:https://stackoverflow.com/questions/51529054/maven-fatal-alert-protocol-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!