xerial / sbt-sonatype

A sbt plugin for publishing Scala/Java projects to the Maven central.
Apache License 2.0
335 stars 65 forks source link

Fix computation of sonatypeDefaultResolver for Sonatype Central #501

Closed kubukoz closed 4 months ago

kubukoz commented 4 months ago

Without the main change, the test fails:

[info] [error] (checkSonatypeDefaultResolver) java.lang.IllegalArgumentException: requirement failed: expected URLRepository(https://SettingKey(This / This / This / sonatypeCredentialHost), Patterns(ivyPatterns=Vector(), artifactPatterns=Vector(), isMavenCompatible=false, descriptorOptional=false, skipConsistencyCheck=false), false) to be URLRepository(https://central.sonatype.com, Patterns(ivyPatterns=Vector(), artifactPatterns=Vector(), isMavenCompatible=false, descriptorOptional=false, skipConsistencyCheck=false), false)

Notably:

https://SettingKey(This / This / This / sonatypeCredentialHost)
vs
https://central.sonatype.com
kubukoz commented 4 months ago

Note that I haven't confirmed that this fully unblocks publishing, but it does resolve a problem from sbt-typelevel.

kubukoz commented 4 months ago

hey @xerial, mind taking a look?

also, this repository seems to be quite commonly relied on in the Scala ecosystem, and it looks like there's only one maintainer - have you considered moving this project to the sbt organization?

xerial commented 4 months ago

@kubukoz Thanks. I'll release a new version soon.

have you considered moving this project to the sbt organization? It sounds like a good idea, as Sonatype has added new types of APIs and different kinds of accounts (s01, etc.), so testing and maintaining sbt-sonatype only by myself has reached its limit. I just opened a discussion thread: https://github.com/xerial/sbt-sonatype/discussions/502. Let's discuss potential directions there.

xerial commented 4 months ago

Just released https://github.com/xerial/sbt-sonatype/releases/tag/v3.11.1