问题
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