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

2.25.3 is unavailable on Gradle repository #1203

Closed
TimvdLippe opened this issue May 11, 2022 · 7 comments
Closed

2.25.3 is unavailable on Gradle repository #1203

TimvdLippe opened this issue May 11, 2022 · 7 comments
Labels

Comments

@TimvdLippe
Copy link

https://github.com/mockito/mockito/runs/6394267570?check_suite_focus=true fails resolving 2.25.3 for com.diffplug.spotless:spotless-lib and com.diffplug.spotless:spotless-lib-extra
Gradle version 7.3.1
Spotless version 6.6.0

Corresponding Dependabot PR at mockito/mockito#2641

@nedtwigg
Copy link
Member

It seems to be on mavenCentral:

Seems like you're using a non-standard repository configuration.

https://github.com/mockito/mockito/blob/f59bf37187ec974a5cec94121158603fef1f597d/build.gradle#L2-L6

Happy to change our publishing process if there's something helpful we can do, but I don't know how to force mavenCentral mirrors to resync.

@davidburstrom
Copy link
Contributor

I suspect that the Gradle plugin portal has stopped mirroring upstream repositories: https://repo.gradle.org/ui/native/jcenter/com/diffplug/spotless/spotless-lib/

Put this in settings.gradle.kts

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

@bwRavencl
Copy link

I suspect that the Gradle plugin portal has stopped mirroring upstream repositories: https://repo.gradle.org/ui/native/jcenter/com/diffplug/spotless/spotless-lib/

Put this in settings.gradle.kts

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

This solves the issue for me.

Is there any statement of the gradle folks about a change concerning mirroring?
Could the spotless-lib be deployed directly to the Gradle plugin portal?

@nedtwigg nedtwigg added bug and removed question labels May 11, 2022
@nedtwigg
Copy link
Member

Weird, I just confirmed there has been some kind of change. For plugin-gradle 6.5.2, everything works with the default repositories. With plugin-gradle 6.6.0, you have to explicitly add mavenCentral() as indicated in the above workaround. We didn't change anything about our publishing process...

I described the behavior change and asked the Gradle team about it here.

@ljacomet
Copy link

Hey folks,

Sorry about that. The Gradle JCenter mirror had one timeout with a too high value. I believe that what happened is a request was made before JCenter itself had mirrored Maven Central - we have noticed delays there recently. And in that case, we were caching that miss for too long.
Issue has been fixed and the dependency can now be found.

@davidburstrom
Copy link
Contributor

Thanks @ljacomet !
I also had to do a ./gradlew :help --refresh-dependencies to get around

> Could not resolve all files for configuration ':classpath'.
   > Could not find spotless-lib-extra-2.25.3.jar (com.diffplug.spotless:spotless-lib-extra:2.25.3).
     Searched in the following locations:
         https://plugins.gradle.org/m2/com/diffplug/spotless/spotless-lib-extra/2.25.3/spotless-lib-extra-2.25.3.jar

@TimvdLippe
Copy link
Author

I successfully merged the Dependabot PR after the fix from the Gradle folks. Thanks for the quick resolution!

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

5 participants