xerial / sbt-sonatype

A sbt plugin for publishing Scala/Java projects to the Maven central.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inconsistent overwrite of Legacy Host

simkoc opened this issue · comments

I am running into trouble setting up my sbt to not use the Legacy Host.

I have configured

credentials += Credentials(
"Sonatype Nexus Repository Manager", "s01.oss.sonatype.org", "<secret>", "<secret>"
)
sonatypeCredentialHost := "s01.oss.sonatype.org"
sonatypeRepository := "https://s01.oss.sonatype.org/service/local" 

in $HOME/.sbt/1.0/global.sbt and am now trying to utilize sonatypeBundleRelease which only works partially.

2021-04-16 15:34:57.014+0200  info [SonatypeService] sonatypeRepository  : https://s01.oss.sonatype.org/service/local  - (SonatypeService.scala:23)
...
2021-04-16 15:35:00.188+0200  info [SonatypeClient] Created successfully: <id>-1007  - (SonatypeClient.scala:139)
2021-04-16 15:35:00.437+0200  info [SonatypeClient] Uploading bundle /PATH/target/sonatype-staging/1.1.7 to https://oss.sonatype.org/service/local/staging/deployByRepositoryId/<id>-1007/  - (SonatypeClient.scala:288)

which leaves me baffled. There is a staging repository at s01 consequently some of the configuration made must have stuck. However, it then seems to try to deploy to the Legacy Host, which fails (of cause).

It seems the configuration for which host to use is inconsistent. For newcomer (like me) it might make things easier if there is no default host to ensure that the correct host has to be set and is used consistently.

I am using sbt-sonatype 3.9.5

This issue is resolved with 3.9.7 I was not aware that there is a newer version as this sonatype referenced documentation says to install 3.9.5.