Failed: RepositoryWritePolicy, faultMessage: Обновление артефакта: Repository = 'Releases: Releases' не позволяет обновлять артефакт - PullRequest
0 голосов
/ 09 марта 2020

Я хочу сделать кросс-релиз для 2.11, 2.12 и 2.13.

Вот конфигурация выпуска:

addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.10")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.8.1")

sbt версия 1.3.8

Вот шаг к выпуску:

import sbt.Keys.crossScalaVersions
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._

lazy val buildTargetVersion = Seq("2.11.12", "2.12.10", "2.13.1")

lazy val assemblySettings = Seq(
  sonatypeBundleDirectory in ThisProject := (ThisProject / baseDirectory).value / target.value.getName / "sonatype-staging" / s"${version.value}",
  publishTo in ThisProject := sonatypePublishToBundle.value,
  releaseCrossBuild := true,
  crossScalaVersions := buildTargetVersion,
  licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html")),
  releaseProcess := Seq[ReleaseStep](
    checkSnapshotDependencies,
    inquireVersions,
    runClean,
    runTest,
    tagRelease,
    releaseStepCommandAndRemaining("+publishSigned"),
    ReleaseStep(action = Command.process("sonatypeBundleRelease", _), enableCrossBuild = true)
  )
)

Когда я выпускаю его, он, кажется, публикуется 4 раза.

sbt:refuel-json> release cross
[info] Setting scala version to 2.11.12
[info] Set current project to refuel-json (in build file:???)
[info] Setting scala version to 2.12.10
[info] Set current project to refuel-json (in build file:???)
[info] Setting scala version to 2.13.1
[info] Set current project to refuel-json (in build file:???)
[info] Setting scala version to 2.13.1                         <= Why???
[info] Set current project to refuel-json (in build file:???)

...

[info] Activity name:close, started:2020-03-09T15:33:53.673Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info] The close process is in progress ...
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: checksum-staging
[info] The close process is in progress ...
[info]     Passed: checksum-staging
[info]   Evaluate: profile-target-matching-staging
[info]     Passed: profile-target-matching-staging
[info]   Evaluate: sources-staging
[info] The close process is in progress ...
[info]     Passed: sources-staging
[info]   Evaluate: signature-staging
[info]     Passed: signature-staging
[info]   Evaluate: javadoc-staging
[info] The close process is in progress ...
[info]     Passed: javadoc-staging
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]     Passed: id:5e9e8e6f8d20a3
[info] The close process is in progress ...
[info]      email: to:omarun_inori@yahoo.co.jp
[info] repositoryClosed: id:comphylage-1168
[info] Closed successfully
[info] Promoting staging repository [comphylage-1168] status:closed, profile:com.phylage(c180edb2bdcbc8) description: [sbt-sonatype] refuel-http 1.0.0-RC6
[info] Activity name:release, started:2020-03-09T15:35:24.906Z
[info]   Evaluate: id:nx-internal-ruleset, rule:RepositoryWritePolicy
[info]   Evaluate: RepositoryWritePolicy
[info]     Failed: RepositoryWritePolicy, failureMessage:Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/com/phylage/refuel-http_2.11/1.0.0-RC6/refuel-http_2.11-1.0.0-RC6-sources.jar'
[info]     Failed: id:nx-internal-ruleset, failureCount:1
[info] repositoryReleaseFailed: id:comphylage-1168, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[error] Failed to promote the repository
[error] Activity name:release, started:2020-03-09T15:35:24.906Z
[error]     Failed: RepositoryWritePolicy, failureMessage:Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/com/phylage/refuel-http_2.11/1.0.0-RC6/refuel-http_2.11-1.0.0-RC6-sources.jar'
[error] java.lang.Exception: Failed to promote the repository
[error] Use 'last' for the full log.

Он говорит, с ошибкой Сообщение: обновление артефакта. Это значит опубликовать артефакт дважды. Однако до этого выпуска промежуточное хранилище не существовало. И это неизданная версия.

Похоже, что это не удалось, но синхронизация с maven central завершена. Что происходит?

=====

Вот полные источники. https://github.com/giiita/refuel

...