Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle and Java 7: unable to download from Maven Central #5740

Closed
ljacomet opened this issue Jun 20, 2018 · 4 comments
Closed

Gradle and Java 7: unable to download from Maven Central #5740

ljacomet opened this issue Jun 20, 2018 · 4 comments
Assignees
Labels
Milestone

Comments

@ljacomet
Copy link
Member

Due to the changes to Maven Central setup on June 18th 2018, effectively banning TLSv1 and TLSv1.1, when using Java 7 Gradle versions that encode the Maven Central HTTPS url can no longer download artifacts.

See https://central.sonatype.org/articles/2018/May/04/discontinue-support-for-tlsv11-and-below/ for etails.

Note that this issue will affect JCenter as of June 24th 2018 - see https://jfrog.com/knowledge-base/why-am-i-failing-to-work-with-jfrog-saas-service-with-tls-1-0-1-1/

Status of Gradle versions:

  • Older than Gradle 2.1, unaffected.
  • Gradle versions 2.1-2.14.1 and using Java 6, affected
    • Use a http URL for maven central and not mavenCentral()
  • Gradle versions 3.0-4.8 and using Java 7
    • Use Java newer than 1.7.0_131-b31 or if not possible
    • Use a http URL for maven central and not mavenCentral()
  • Gradle versions 3.0-4.8 and using Java 8+, unaffected.
@ljacomet ljacomet added this to the 4.8.1 milestone Jun 20, 2018
@ljacomet ljacomet self-assigned this Jun 20, 2018
@ljacomet
Copy link
Member Author

Proposed solution:

  • Gradle 4.8.1 and later will automatically set the TLS protocols to ["TLSv1", "TLSv1.1", "TLSv1.2"] for Java 7.
  • In addition, if the property https.protocols is set, it will be used.

cgendreau pushed a commit to Canadensys/vascan that referenced this issue Jun 22, 2018
@ghost
Copy link

ghost commented Jun 25, 2018

I am still having issues even thought it seemed to work for me a few days ago.

Error resolving plugin [id: 'com.bmuschko.tomcat', version: '2.2.5']

Could not resolve all dependencies for configuration 'detachedConfiguration1'.
Could not determine artifacts for com.bmuschko.tomcat:com.bmuschko.tomcat.gradle.plugin:2.2.5
> Could not get resource 'https://plugins.gradle.org/m2/com/bmuschko/tomcat/com.bmuschko.tomcat.gradle.plugin/2.2.5/com.bmuschko.tomcat.gradle.plugin-2.2.5.jar'.
> Could not HEAD 'https://plugins.gradle.org/m2/com/bmuschko/tomcat/com.bmuschko.tomcat.gradle.plugin/2.2.5/com.bmuschko.tomcat.gradle.plugin-2.2.5.jar'.
> Received fatal alert: handshake_failure

@marcphilipp
Copy link
Contributor

@RicKla Are you using 4.8.1?

@ljacomet
Copy link
Member Author

That's because of #5777, where JCenter has a different twist on the story.

ksoichiro added a commit to ksoichiro/gradle-web-resource-plugin that referenced this issue Jun 27, 2018
Seems not working on JDK7...
gradle/gradle#5740

Download fails with this error:

```
Received fatal alert: protocol_version
```

and setting -Dhttps.protocols does not affect.
cgendreau added a commit to Canadensys/canadensys-common that referenced this issue Jun 27, 2018
nitzanj added a commit to cloudinary/cloudinary_java that referenced this issue Jul 1, 2018
nitzanj added a commit to cloudinary/cloudinary_java that referenced this issue Jul 1, 2018
nitzanj added a commit to cloudinary/cloudinary_java that referenced this issue Jul 1, 2018
mernst added a commit to mernst/randoop that referenced this issue Jul 11, 2018
mernst added a commit to randoop/randoop that referenced this issue Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants