java -Dhttps.protocols=TLSv1.2 -cp %ANT_HOME%/lib/ant-launcher.jar org.apache.tools.ant.launch.Launcher
Solution 2: use Java 7 with Oracle Advanced Support
Also problem can be solved by updating the Java 7 version. But the last available version (7u80
) doesn't fix the problem. It is need to use an update provided with Oracle Advanced Support (formerly known as Java for Business).
Solution 3: use Java 8 or above instead
Configure $JAVA_HOME
to point to Java 8.
Sonatype FAQ about the issue
Discontinued support for TLSv1.1 and below
–
–
In June 2018, in an effort to raise security and comply with modern standards, the insecure TLS 1.0 & 1.1 protocols will no longer be supported for SSL connections to Central. This should only affect users of Java 6 (and Java 7) that are also using https to access central, which by our metrics is less than .2% of users.
For more details and workarounds, see the blog and faq here: https://blog.sonatype.com/enhancing-ssl-security-and-http/2-support-for-central
–
–
As said @v.ladynev, it works with JDK 1.7
With Eclipse, to be able to perform a "Run As" maven install
with the TLS command-line parameter, just configure the JDK you're using.
Open the dialog through Window > Preferences > Java > Installed JREs.
Then highlight the one you're using (should be a JDK, not a JRE), click on Edit. In the field "Default VM arguments", fill the value -Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2
. As shown below:
Clean the project (maybe optional), then re-run a maven install
.
–
–
Note that if you're using the IBM JDK you may also have to set
com.ibm.jsse2.overrideDefaultTLS=true
https://www.ibm.com/support/knowledgecenter/SSYKE2_8.0.0/com.ibm.java.security.component.80.doc/security-component/jsse2Docs/matchsslcontext_tls.html#matchsslcontext_tls
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.