Cutting a Scala Library Release

#1

Hello! I’m trying to deploy a scala library to the Central repository using the instructions here:

https://docs.scala-lang.org/overviews/contributors/index.html#cut-a-release

When I get to the sbt publishSigned command, it gives me a 400 error in response to a PUT request after I enter my PGP passphrase. Has anyone else encountered this? Anyone have any ideas on how to troubleshoot it?

Thanks!

#2

Maybe this can help ->

Please check you are using a group that is new and does not belong to anyone else. Also as the guide mentioned, try to use a new version everytime you make a publish (if those are the politicts of your artifact).

#3

Run the last command in SBT after the failed sbtPublish, this should print a more verbose log which might give a clue what’s going on.

1 Like
#4

I’ve confirmed that the group belongs to me. This is the first time I’ve tried to publish this project (or any project for that matter). Since the group is completely empty it shouldn’t matter what version I use. Based on the troubleshooting guide, I’d have to conclude that a release artifact is being deployed to a snapshot repository or vice-versa. I’ll continue along that hypothesis.

Thanks!

#5

last doesn’t seem to give any extra information. It prints out the same exception details.

#6

Figured out the issue. Beware the sbt-dynver plugin. Once I removed it, I was able to publish without error.

#7

fwiw: I use sbt-dynver and sbt-sonatype together on multiple projects, have for quite a while now, have always found them to work fine together.

I have no idea why your experience was different. in the process of troubleshooting this, did you get any indication of the specific nature of the problem?

#8

Looking back I noticed that it was trying to push a release to snapshot when I use sbt-denver. When I commented the plugin out and explicitly specified the version, it pushed the release instead.

#9

Having done this a few different ways over the years and never quite understanding any of it, I highly recommend the publishing setup provided by sbt-ci-release. It pulls in everything you need and the instructions are very good. https://github.com/olafurpg/sbt-ci-release