-
Notifications
You must be signed in to change notification settings - Fork 4k
bazel: Use https to download from Maven Central #6543
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
Conversation
central.maven.org shouldn't have been used in the first place as it isn't one of the canonical URLs to Maven Central, but even more importantly we want to use https. The previous URL will probably stop working January 15, 2020[1][2]. Fixes grpc#6536 1. https://central.sonatype.org/articles/2019/Apr/30/http-access-to-repo1mavenorg-and-repomavenapacheorg-is-being-deprecated/ 2. https://central.sonatype.org/articles/2019/Nov/15/non-canonical-urls-will-be-redirected-today/
| name = "com_google_android_annotations", | ||
| artifact = "com.google.android:annotations:4.1.1.4", | ||
| server_urls = ["http://central.maven.org/maven2"], | ||
| server_urls = ["https://repo.maven.apache.org/maven2/"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is "https://repo.maven.apache.org/maven2/" preferred over "https://repo1.maven.org/maven2" ? Wondering why not use a "maven.org" URL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems they are resolved to different ip addresses, can we add both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://central.sonatype.org/articles/2018/Dec/17/ssl-endpoints/ talks about the two canonical URLs. I learned of repo.maven.apache.org as part of gradle/gradle#3463 . It's hard to tell exactly, but it seems Maven recommends repo.maven.apache.org (maybe because they control it) but Sonatype (Maven Central itself) tends to recommend repo1.maven.org (maybe because they control it, or they have out-dated documentation).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be more clear: yes, maven.org is not controlled by the Maven project, but instead a commercial entity that grew out of the Maven project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding both seems to be a good idea if they are actually different servers (I thought one of them was just a redirect).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maven and Gradle both only use a single of the two URLs. I don't see much advantage in using both. Both should be behind a CDN, so each probably have many IPs.
|
I've backported this as far as 1.23, since this will probably blind-side users. I can backport further back if necessary. |
central.maven.org shouldn't have been used in the first place as it isn't one
of the canonical URLs to Maven Central, but even more importantly we want to
use https. The previous URL will probably stop working January 15, 2020[1][2].
Fixes #6536