question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Could not build new project due to jCenter shutdown

See original GitHub issue

Bug 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
  1. Clean all gradle caches
  2. 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:open
  • Created 2 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
trevorschadtcommented, Jan 12, 2022

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

> Could not resolve com.fasterxml.jackson.datatype:jackson-datatype-joda:2.12.5.
     Required by:
         project : > org.openapitools:openapi-generator-gradle-plugin:5.3.1 > org.openapitools:openapi-generator:5.3.1 > com.fasterxml.jackson.datatype:jackson-datatype-guava:2.12.5 > com.fasterxml.jackson:jackson-bom:2.12.5
      > Could not resolve com.fasterxml.jackson.datatype:jackson-datatype-joda:2.12.5.
         > Could not get resource 'https://plugins.gradle.org/m2/com/fasterxml/jackson/datatype/jackson-datatype-joda/2.12.5/jackson-datatype-joda-2.12.5.module'.
            > Could not GET 'https://jcenter.bintray.com/com/fasterxml/jackson/datatype/jackson-datatype-joda/2.12.5/jackson-datatype-joda-2.12.5.module'. Received status code 502 from server: Bad Gateway

Suggest a fix: Remove all references to jcenter repository in openapi-generator build files

0reactions
wing328commented, Jan 17, 2022

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found