Skip to content

sonaUpload task does not use artifact name in deployment identifier #8218

@jeanmarc

Description

@jeanmarc

steps

Tested with SBT 1.11.0 and 1.11.4.
Give the sbt publishSigned and sbt sonaUpload commands for an sbt project of a package that you can publish on Sonatype.
Observe the name of the deployment that is uploaded:

I have tried setting ThisBuild / sonaDeplymentName or project.settings( sonaDeploymentName) without effect. I could not find documentation on how to use this setting.

sbt:sbt-azure-functions-plugin> publishSigned
[warn] versionScheme setting is empty; set `ThisBuild / versionScheme := Some("early-semver")`, `Some("semver-spec")` or `Some("pvp")`
[warn] so tooling can use it for eviction errors etc - https://www.scala-sbt.org/1.x/docs/Publishing.html
[info] Wrote /Users/jml/work/sopra/repos/codestar/sbt-plugins/sbt-azure-functions-plugin/plugin/target/scala-2.12/sbt-1.0/sbt-azure-functions_2.12_1.0-0.4.6.pom
[warn] versionScheme setting is empty; set `ThisBuild / versionScheme := Some("early-semver")`, `Some("semver-spec")` or `Some("pvp")`
[warn] so tooling can use it for eviction errors etc - https://www.scala-sbt.org/1.x/docs/Publishing.html
[info]  published sbt-azure-functions_2.12_1.0 to /Users/jml/work/sopra/repos/codestar/sbt-plugins/sbt-azure-functions-plugin/target/sona-staging/nl/codestar/sbt-azure-functions_2.12_1.0/0.4.6/sbt-azure-functions_2.12_1.0-0.4.6.pom.asc
[info]  published sbt-azure-functions_2.12_1.0 to /Users/jml/work/sopra/repos/codestar/sbt-plugins/sbt-azure-functions-plugin/target/sona-staging/nl/codestar/sbt-azure-functions_2.12_1.0/0.4.6/sbt-azure-functions_2.12_1.0-0.4.6.pom
[info]  published sbt-azure-functions_2.12_1.0 to /Users/jml/work/sopra/repos/codestar/sbt-plugins/sbt-azure-functions-plugin/target/sona-staging/nl/codestar/sbt-azure-functions_2.12_1.0/0.4.6/sbt-azure-functions_2.12_1.0-0.4.6-javadoc.jar.asc
[info]  published sbt-azure-functions_2.12_1.0 to /Users/jml/work/sopra/repos/codestar/sbt-plugins/sbt-azure-functions-plugin/target/sona-staging/nl/codestar/sbt-azure-functions_2.12_1.0/0.4.6/sbt-azure-functions_2.12_1.0-0.4.6.jar
[info]  published sbt-azure-functions_2.12_1.0 to /Users/jml/work/sopra/repos/codestar/sbt-plugins/sbt-azure-functions-plugin/target/sona-staging/nl/codestar/sbt-azure-functions_2.12_1.0/0.4.6/sbt-azure-functions_2.12_1.0-0.4.6-sources.jar
[info]  published sbt-azure-functions_2.12_1.0 to /Users/jml/work/sopra/repos/codestar/sbt-plugins/sbt-azure-functions-plugin/target/sona-staging/nl/codestar/sbt-azure-functions_2.12_1.0/0.4.6/sbt-azure-functions_2.12_1.0-0.4.6.jar.asc
[info]  published sbt-azure-functions_2.12_1.0 to /Users/jml/work/sopra/repos/codestar/sbt-plugins/sbt-azure-functions-plugin/target/sona-staging/nl/codestar/sbt-azure-functions_2.12_1.0/0.4.6/sbt-azure-functions_2.12_1.0-0.4.6-sources.jar.asc
[info]  published sbt-azure-functions_2.12_1.0 to /Users/jml/work/sopra/repos/codestar/sbt-plugins/sbt-azure-functions-plugin/target/sona-staging/nl/codestar/sbt-azure-functions_2.12_1.0/0.4.6/sbt-azure-functions_2.12_1.0-0.4.6-javadoc.jar
[success] Total time: 2 s, completed 19 Aug 2025, 14:45:40
sbt:sbt-azure-functions-plugin> sonaUpload
[info] uploading bundle to the Central Portal (attempt: 1)
[info] deployment nl.codestar:0.4.6:516c7e99 VALIDATING 1/n
[info] deployment nl.codestar:0.4.6:516c7e99 VALIDATED 2/n
sbt:sbt-azure-functions-plugin>

The deployment name consists of <namespace>:<version>:<deploymentId>, and the artifact name is missing

problem

At the Sonatype side, this lack of artifact name makes it hard to distinguish the different deployments, especially in namespaces where multiple components have similar versions.

expectation

The deployment name sent to Sonatype should include <namespace>:<artifactId>:<version>:<deploymentId>

notes

Also asked on SO, no responses yet[1]

[1] - https://stackoverflow.com/q/79740083/2037054

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions