Can not set sonatypeProfileName
sagifogel opened this issue · comments
Hi,
I'm having trouble deploying to https://s01.oss.sonatype.org.
I tried using these lines:
ThisBuild / sonatypeProfileName: = "io.github.sagifogel"
ThisBuild / sonatypeCredentialHost: = Sonatype.sonatype01
ThisBuild / sonatypeRepository: = s "https: // $ {Sonatype.sonatype01} / service / local"
But somehow the default sonatype repository https://oss.sonatype.org/service/local is used.
This is my repository
This is my sonatype jira ticket
Thank you very much.
I'm not sure how sbt-ci-release uses sbt-sonatype, but at least you can check the setting by running sonatypeRespository command:
$ sbt
> sonatypeRepository
For some reason, your project uses the default one for all projects:
sbt:proptics> sonatypeRepository
[info] coreJVM / sonatypeRepository
[info] https://oss.sonatype.org/service/local
[info] lawJVM / sonatypeRepository
[info] https://oss.sonatype.org/service/local
[info] testJVM / sonatypeRepository
[info] https://oss.sonatype.org/service/local
[info] example / sonatypeRepository
[info] https://oss.sonatype.org/service/local
[info] profunctorJVM / sonatypeRepository
[info] https://oss.sonatype.org/service/local
[info] propticsJVM / sonatypeRepository
[info] https://oss.sonatype.org/service/local
[info] coreJS / sonatypeRepository
[info] https://oss.sonatype.org/service/local
[info] profunctorJS / sonatypeRepository
[info] https://oss.sonatype.org/service/local
[info] lawJS / sonatypeRepository
[info] https://oss.sonatype.org/service/local
[info] testJS / sonatypeRepository
[info] https://oss.sonatype.org/service/local
[info] propticsJS / sonatypeRepository
[info] https://oss.sonatype.org/service/local
[info] sonatypeRepository
[info] https://oss.sonatype.org/service/local
So you may need to add sonatypCredentialHost setting for each of your project, instead of setting it globally at ThisBuild scope.
It worked, thank you very much.
Unfortunately I have another problem.
It seems that I try to publish under my organization name com.github.sagifogel
although I explicitly set the
sonatypeProfileName := "io.github.sagifogel"
for each project like you wrote.
profile-target-matching-staging, failureMessage:Profile target mismatch: /com/github/sagifogel/proptics-core_sjs1_2.12/0.1.0/proptics-core_sjs1_2.12-0.1.0-javadoc.jar.asc.md5
and also If I run
sbt sonatypeProfileName
I get
sbt:proptics> sonatypeProfileName
[info] lawJVM / sonatypeProfileName
[info] io.github.sagifogel
[info] coreJVM / sonatypeProfileName
[info] io.github.sagifogel
[info] profunctorJVM / sonatypeProfileName
[info] io.github.sagifogel
[info] example / sonatypeProfileName
[info] io.github.sagifogel
[info] testJVM / sonatypeProfileName
[info] io.github.sagifogel
[info] propticsJVM / sonatypeProfileName
[info] io.github.sagifogel
[info] coreJS / sonatypeProfileName
[info] io.github.sagifogel
[info] profunctorJS / sonatypeProfileName
[info] io.github.sagifogel
[info] lawJS / sonatypeProfileName
[info] io.github.sagifogel
[info] testJS / sonatypeProfileName
[info] io.github.sagifogel
[info] propticsJS / sonatypeProfileName
[info] io.github.sagifogel
[info] sonatypeProfileName
[info] io.github.sagifogel
https://github.com/sagifogel/Proptics/runs/2525958196?check_suite_focus=true
What am I doing wrong?
Thanks again.
You need to fix your organization setting in your build.sbt. For example, you are explicitly setting com.github.sagifogel
at https://github.com/sagifogel/Proptics/blob/master/build.sbt#L8
But your sonatype profile name is io.github.saigfogel, so Sonatype always rejects releasing artifacts to other than under io.github.saigfogel
It worked.
Thank you very much for your help.