[BUG] Could not build new project due to jCenter shutdown
See original GitHub issueBug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- Have you tested with the latest master to confirm the issue still exists? (not applicable)
- Have you searched for related issues/PRs?
- What’s the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
The certificate of jCenter is outdated as per 2021-11-09. This leads to building error:
A problem occurred configuring project ':project-name'.
> Could not resolve all artifacts for configuration ':project-name:classpath'.
> Could not resolve org.openapitools:openapi-generator:5.3.0.
Required by:
project :project-name > org.openapi.generator:org.openapi.generator.gradle.plugin:5.3.0 > org.openapitools:openapi-generator-gradle-plugin:5.3.0
> Could not resolve org.openapitools:openapi-generator:5.3.0.
> Could not get resource 'https://plugins.gradle.org/m2/org/openapitools/openapi-generator/5.3.0/openapi-generator-5.3.0.pom'.
> Could not GET 'https://jcenter.bintray.com/org/openapitools/openapi-generator/5.3.0/openapi-generator-5.3.0.pom'.
> PKIX path validation failed: java.security.cert.CertPathValidatorException: validity check failed
> Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.30.
Required by:
project :project-name > org.openapi.generator:org.openapi.generator.gradle.plugin:5.3.0 > org.openapitools:openapi-generator-gradle-plugin:5.3.0
> Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.30.
> Could not get resource 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.30/kotlin-stdlib-jdk8-1.3.30.pom'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.30/kotlin-stdlib-jdk8-1.3.30.pom'.
> PKIX path validation failed: java.security.cert.CertPathValidatorException: validity check failed
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
org.openapitools:openapi-generator-gradle-plugin:5.3.0
should be published to another repo, perhaps Maven Central, you can follow JCenter shutdown impact on Gradle builds article for more info.
openapi-generator version
5.3.0
OpenAPI declaration file content or url
not applicable
Generation Details
Steps to reproduce
- Clean all gradle caches
- Build a minimal repo with gradle plugin
id 'org.openapi.generator' version '5.3.0'
Related issues/PRs
Related issue in Kotlin gradle plugin: https://youtrack.jetbrains.com/issue/KT-49621
Suggest a fix
Publish org.openapitools:openapi-generator-gradle-plugin
to Maven Central instead of jCenter
Temporary fix
I’ve found a temporary fix, you can add this snippet at the very top of your settings.gradle file:
pluginManagement {
repositories {
mavenCentral()
gradlePluginPortal()
}
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Gradle build after JCenter shutdown - Microsoft Learn
This problem is caused by the fact that JFrog has shutdown JCenter (part of Bintray) on May 1, 2021. The JCenter was important...
Read more >JCenter Shutdown Impact on Gradle Builds
On February 3 2021, JFrog announced that they will be shutting down Bintray and JCenter. This post tells you what you need to...
Read more >Remove JCenter Dependencies · Issue #1456 - GitHub
JCenter, which is a repository used in our builds, ceased operations today. Gradle was pulling dependencies from JCenter, and some repos have a...
Read more >Is JCenter down permanently (31 Oct)? - Stack Overflow
To add those repositories in your project, add following in repositories block (you might already have those). Order matters. Make sure to put ......
Read more >JCenter service update - Android Developers
JFrog, the company that maintains the JCenter artifact repository used by many Android projects, made JCenter a read-only repository on March 31st, 2021....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The issue has resurfaced, and with JCenter looking to go permanently offline there needs to be a better solution than assuming they will update their certs.
Relevant build output
Suggest a fix: Remove all references to jcenter repository in openapi-generator build files
Thanks for informing us about this. I wonder if you guys have time to file a PR to update the mustache templates to remove any reference to jcenter?