尝试
sbt sonatypeRelease
库会出现此错误:
2024-01-26 18:42:35.491+0300 info [SonatypeClient] Failed: pom-staging, failureMessage:Invalid POM: /io/github/omitted/omitted_sjs1_3/0.3.6/omitted_sjs1_3-0.3.6.pom: Project URL missing, SCM URL missing, Developer information missing - (SonatypeClient.scala:389)
需要将什么设置键放入我的
build.sbt
来解决这个问题?
您需要在 SBT 定义中添加以下设置(通常为
build.sbt
):
// Project URL
ThisBuild / homepage := Some(url("https://yourwebsite.com"))
// SCM
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/company/project"),
"scm:[email protected]:company/project.git"
)
)
// Developers
ThisBuild / developers := List(Developer(...))
// License (example)
ThisBuild / licenses := List("MIT" -> url("http://opensource.org/licenses/MIT"))