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

Fix Resolvers.sonatypeRepo("releases") #5405

Closed
dwijnand opened this issue Jan 29, 2020 · 2 comments · Fixed by sbt/librarymanagement#379
Closed

Fix Resolvers.sonatypeRepo("releases") #5405

dwijnand opened this issue Jan 29, 2020 · 2 comments · Fixed by sbt/librarymanagement#379
Labels

Comments

@dwijnand
Copy link
Member

steps

sbt version: 1.3.7

problem

  • Add Resolvers.sonatypeRepo("releases").
  • Try resolve an artifact released on Sonatype but which hasn't synced to Maven Central.
  • It fails.

expectation

I expect it to resolve successfully.

notes

In truth, it's a problem "upstream" (Sonatype), but my guess is it's an intentionally breaking change.

Resolvers.sonatypeRepo("releases") results in https://oss.sonatype.org/content/repositories/releases/, which seems now seems to just redirect to Maven Central:

08:06:25 $ curl -IL https://oss.sonatype.org/content/repositories/releases/
HTTP/2 302
server: awselb/2.0
date: Wed, 29 Jan 2020 08:06:42 GMT
content-type: text/html
content-length: 126
location: https://repo1.maven.org:443/content/repositories/releases/

HTTP/2 301
location: https://repo1.maven.org/maven2/
via: 1.1 varnish
accept-ranges: bytes
date: Wed, 29 Jan 2020 08:06:42 GMT
via: 1.1 varnish
age: 1596835
x-served-by: cache-iad2124-IAD, cache-lon4276-LON
x-cache: HIT, HIT
x-cache-hits: 1, 7
x-timer: S1580285202.244851,VS0,VE0
vary: Fastly-SSL,
content-length: 0

HTTP/2 200
last-modified: Tue, 21 Jan 2020 12:21:53 GMT
etag: "878ef9a1442adafe195eedef81e5f573"
content-type: text/html
via: 1.1 varnish
accept-ranges: bytes
date: Wed, 29 Jan 2020 08:06:42 GMT
via: 1.1 varnish
age: 675818
x-served-by: cache-iad2125-IAD, cache-lon4276-LON
x-cache: HIT, HIT
x-cache-hits: 1, 16
x-timer: S1580285202.247566,VS0,VE0
content-length: 117145

The URL https://oss.sonatype.org/service/local/repositories/releases/content/, instead, seems to work:

08:06:42 $ curl -IL https://oss.sonatype.org/service/local/repositories/releases/content/
HTTP/2 200
date: Wed, 29 Jan 2020 08:07:08 GMT
content-type: application/xml
content-length: 0
server: nginx
x-frame-options: SAMEORIGIN
x-content-type-options: nosniff
pragma: no-cache
cache-control: no-cache, no-store, max-age=0, must-revalidate
cache-control: post-check=0, pre-check=0
expires: 0
last-modified: Wed, 29 Jan 2020 03:30:40 GMT
vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
x-request-class: DONT

So should Resolvers.sonatypeRepo("releases") be changed to that? Or introduce a new method and deprecate that one?

@eed3si9n
Copy link
Member

eed3si9n commented Mar 4, 2020

So should Resolvers.sonatypeRepo("releases") be changed to that?

If the new endpoint is semi-official then probably we should?

@mkurz
Copy link
Member

mkurz commented May 18, 2021

So should Resolvers.sonatypeRepo("releases") be changed to that?

If the new endpoint is semi-official then probably we should?

Here we go: sbt/librarymanagement#379

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants