OpenAPITools / OpenAPITools/openapi-generator

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

Open
#10,816 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

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()
    }
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure by clearing Gradle caches and building a minimal project with the org.openapi.generator plugin version 5.3.0. Start with the plugin publication and repository configuration, using the settings.gradle pluginManagement workaround as a reference. Done means the plugin and its dependencies resolve without requests to jCenter.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kotlin
Domain
build-system, release
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.