[Gradle] UseHttpsForRepositories recipe doesn't work because it can't resolve dependencies via http #3637
-
Hi! ❯ gradle --init-script init.gradle rewriteRun
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'gradle'.
> Could not resolve all dependencies for configuration ':classpath'.
> Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'maven(http://maven.artifacts.mydomain.com/repository/all)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols.
See https://docs.gradle.org/7.3/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details. I'd expect to be able to execute this recipe on projects that have http repositories. If not, what's the purpose of it? build.gradlebuildscript {
repositories {
maven { url "http://maven.artifacts.mydomain.com/repository/all" }
}
} I'm executing it like an initscript pretty much the same as the one in the docs. Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
marcorichetta
Oct 19, 2023
Replies: 1 comment 1 reply
-
I was running it with Gradle 6.3. I forgot I can use the gradle wrapper of the project, which is v6.8 in this case. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
timtebeek
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was running it with Gradle 6.3. I forgot I can use the gradle wrapper of the project, which is v6.8 in this case.
After that I could successfully run the recipe