Problem with profile-target-matching-staging
JulienSt opened this issue · comments
Hey there, I need a little advise. I am almost finished with releasing to maven, but there is still one thing getting in my way. Here is the error message I encounter:
[info] Finished bundle upload: D:\Programming\Repos\ezXML\target\sonatype-staging\0.1
[info] Closing staging repository [comgithubjulienst-1006] status:open, profile:com.github.julienst(324d1c9caef218) description: [sbt-sonatype] ezXML 0.1
[info] Activity name:open, started:2020-03-05T20:17:54.101Z, stopped:2020-03-05T20:18:51.040Z
[info] repositoryCreated: id:comgithubjulienst-1006, user:JulienSt, ip:77.13.5.222
[info] Activity name:close, started:2020-03-05T20:19:31.291Z
[info] Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info] Evaluate: no-traversal-paths-in-archive-file
[info] Passed: no-traversal-paths-in-archive-file
[info] Evaluate: pom-staging
[info] The close process is in progress ...
[info] Passed: pom-staging
[info] Evaluate: profile-target-matching-staging
[info] The close process is in progress ...
[info] Failed: profile-target-matching-staging, failureMessage:Profile target mismatch: /JulienSt/ezxml-extension_2.13/0.1/ezxml-extension_2.13-0.1.pom
[info] Evaluate: checksum-staging
[info] Passed: checksum-staging
[info] Evaluate: javadoc-staging
[error] Failed to close the repository
[error] Activity name:close, started:2020-03-05T20:19:31.291Z
[error] Failed: profile-target-matching-staging, failureMessage:Profile target mismatch: /JulienSt/ezxml-extension_2.13/0.1/ezxml-extension_2.13-0.1.pom
[error] java.lang.Exception: Failed to close the repository
My sonatype ticket can be found here: https://issues.sonatype.org/browse/OSSRH-55603
As mentioned there something seems to be wrong with my group Id, as the output shows mismatch: /JulienSt/ezxml- ...
and not something with github included.
Does somebody know whats happening here?
This is the repo in question:
https://github.com/JulienSt/ezXML
And this is the build.sbt
name := "ezXML"
ThisBuild / organization := "com.github.julienst"
ThisBuild / version := "0.1"
ThisBuild / scalaVersion := "2.13.1"
ThisBuild / libraryDependencies := Seq (
"org.scala-lang.modules" %% "scala-xml" % "1.2.0", // https://mvnrepository.com/artifact/org.scala-lang.modules/scala-xml
"junit" % "junit" % "4.12" % Test, // https://mvnrepository.com/artifact/junit/junit
"org.scalatest" %% "scalatest" % "3.1.1" % Test // https://mvnrepository.com/artifact/org.scalatest/scalatest
)
lazy val core = (project in file("core")).settings(name := "ezxml.core")
lazy val extension = (project in file("extension")).dependsOn(core).settings(
name := "ezxml.extension",
scalacOptions += "-Ymacro-annotations",
libraryDependencies += "org.scala-lang" % "scala-reflect" % "2.13.1", // https://mvnrepository.com/artifact/org.scala-lang/scala-reflect,
)
lazy val root = (project in file(".")).aggregate(core, extension)
ThisBuild / publishTo := sonatypePublishToBundle.value
ThisBuild / sonatypeProfileName := "JulienSt"
ThisBuild / licenses := Seq("MIT" -> url("https://raw.githubusercontent.com/JulienSt/ezXML/master/LICENSE"))
ThisBuild / publishMavenStyle := true
ThisBuild / homepage := Some(url("https://github.com/julienst/ezxml"))
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/julienst/ezxml"),
"scm:https://github.com/JulienSt/ezXML.git"
)
)
ThisBuild / developers := List(
Developer(id="com.github.julienst", name="Julien Stengel", email="julien.stengel@gmail.com", url=url("https://github.com/julienst"))
)
I already switched out the scm, groupId, Devloper(id=), and sonarTypeProfileName, but nothing seems to matter.
It seems your sonatypeProfileName doesn't match with a reverse domain name like "com.github.julienst". You need to check the generated pom.xml file and confirm the group name is what you expected.
sonatypeProfileName is not the user name of Sonatype account.
thank you, the problem actually was the sonatypeProfileName. It was wrongly configured inside my sonatype.sbt from my home directory. That lead to the incorrect path structure during "publishSinged"
All worked out