Plugins redirecting to jcenter

For some reason a few hours ago our CI started breaking when the swagger v3 gradle plugin URL began redirecting to jcenter. I can’t tell if this is something they need to fix or if its breakage with the plugin service itself

full error:

A problem occurred configuring project ':backend:servicer-api'.
> Could not resolve all artifacts for configuration ':backend:servicer-api:classpath'.
   > Could not resolve io.swagger.core.v3:swagger-gradle-plugin:2.1.12.
     Required by:
         project :backend:servicer-api > io.swagger.core.v3.swagger-gradle-plugin:io.swagger.core.v3.swagger-gradle-plugin.gradle.plugin:2.1.12
      > Could not resolve io.swagger.core.v3:swagger-gradle-plugin:2.1.12.
         > Could not get resource 'https://plugins.gradle.org/m2/io/swagger/core/v3/swagger-gradle-plugin/2.1.12/swagger-gradle-plugin-2.1.12.module'.
            > Could not GET 'https://jcenter.bintray.com/io/swagger/core/v3/swagger-gradle-plugin/2.1.12/swagger-gradle-plugin-2.1.12.module'. Received status code 502 from server: Bad Gateway

issue filed against swagger-core:

We are getting the same issue but related with another plugin: gradle-kotlin-dsl-plugins

From what I was able to tell, for this specific plugin, from version 2.1.4 under they are unavaiable exactly because they are stored in jcenter.

Similar issue but for a different plugin - what do you normally do here? Just wait for it to be fixed?

I’ve been using this plugin to generate TypeScript:
classpath group: 'cz.habarta.typescript-generator', name: 'typescript-generator-gradle-plugin', version: '2+'

But this link doesn’t have habarta listed and jcenter doesn’t know what to do besides return a 502
https://plugins.gradle.org/m2/cz/

Currently, if a Gradle plugin needs to be fetched, it seems to hit JCenter. JCenter is down and is returning an HTTP 502. Can we get an update from Gradle team on what’s being done to work around this?

We are actively working on resolving this issue but the ties to JCenter run deep and we have not cut them all.

Follow status.gradle.com for more information.

2 Likes

Just to help anyone who stumbles here:

i pulled the swagger plugin and checked out their v2.1.12 tag. Then i added

        maven {
            url = uri("s3://PRIVATE_MAVEN_BUCKET.s3.us-east-2.amazonaws.com/maven/release")
            authentication {
                awsIm(AwsImAuthentication)
            }
        }

to the publish block and did publish. then in the project which depends on the plugin i did this in the settings.gradle.kts

pluginManagement {
    repositories {
        maven {
            url = uri("s3://PRIVATE_MAVEN_BUCKET.s3.us-east-2.amazonaws.com/maven/release")
            authentication {
                create<AwsImAuthentication>("awsIm")
            }
        }

        mavenCentral()
        gradlePluginPortal()
    }
}

this makes it check the s3 bucket first before going anywhere else. not a great solution but it unblocks our release.

1 Like

I don’t think it is anything swagger-core can fix. Gradle itself depends on JCenter when gradlePluginPortal() is used.

This works so long as the plugins’ dependencies are on Maven Central:

pluginManagement {
    repositories {
        mavenCentral()
        gradlePluginPortal()
    }
}

I had the similar issue with com.netflix.dgs.codegen where it was redirected towards Jcenter but since this morning its working.

We faced with similar issue yesterday. But it’s strange, because we don’t have dependencies to jcenter in builde.gradle file. We have dependencies only to MavenCentral and to Gradle Plugin Portal (https://plugins.gradle.org/m2/).
It means, that Gradle Plugin still redirects some data to/from to jcenter?
It was announced, that jcenter will be shotdown on 01.02.2022 (JFrog to Shut down JCenter and Bintray).
And in another article it says that it’s planned to migrate Plugin Portal away from JCenter before the final shutdown (JCenter shutdown impact on Gradle builds). It’s not done yet?

FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'qa-auto-sss'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve ru.action_tech:ghelper:2.+.
     Required by:
         project :
      > Failed to list versions for ru.action_tech:ghelper.
         > Unable to load Maven meta-data from https://plugins.gradle.org/m2/ru/action_tech/ghelper/maven-metadata.xml.
            > Could not get resource 'https://plugins.gradle.org/m2/ru/action_tech/ghelper/maven-metadata.xml'.
               > Could not GET 'https://jcenter.bintray.com/ru/action_tech/ghelper/maven-metadata.xml'.
                  > Read timed out
   > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10.
     Required by:
         project : > org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.5.10
      > Skipped due to earlier error
1 Like