https://kotlinlang.org logo
#github-workflows-kt
Title
# github-workflows-kt
p

Piotr Krzemiński

10/18/2023, 7:08 PM
I'm struggling with getting snapshots published to Sonatype repo. Here's my PR: https://github.com/typesafegithub/github-workflows-kt/pull/1030 , and see the job's logs here, there's:
Copy code
> Could not PUT '<https://s01.oss.sonatype.org/service/local/staging/deployByRepositoryId/iogithubtypesafegithub-1027/io/github/typesafegithub/action-binding-generator/1.3.2-SNAPSHOT/maven-metadata.xml>'. Received status code 400 from server: Bad Request
any trick how to make Sonatype tell us more?
1
like, the HTTP response body?
j

Javier

10/18/2023, 8:03 PM
I use Nexus plugin without issues to publish to sonatype, maybe you can give it a try. https://github.com/gradle-nexus/publish-plugin
👍 1
p

Piotr Krzemiński

10/18/2023, 9:43 PM
mystery solved, it turned out I already use this plugin here, and the root cause of my problems was that I haven't defined
group
and
version
in the top-level
build.gradle.kts
before configuring the plugin, so the release URL was taken instead of the snapshot one
👀 1
it's mentioned in the docs here:
It is important to set the group and the version to the root project, so the plugin can detect if it is a snapshot version or not in order to select the correct repository where artifacts will be published.