3

我想sbt publish用一些校验和发布我的 JAR,但是我似乎无法实现这一点。

文档说默认情况下启用校验和,我可以确认checksums返回我md5sha1在 sbt 中。如果我这样做,我还可以看到生成的校验和sbt publishLocal。但是,当我sbt publish在 CI 服务器上将 JAR 发布到我们公司的 Artifactory 服务器时,没有校验和。

我错过了什么?

更多信息:

  • sbt 1.4.6
  • publishMavenStyle := true
  • publishTo := <internal Artifactory>
  • 我会说它特定于我公司的 Artifactory,因为publishLocal效果很好。
  • publish / checksumschecksums返回与 just which 是md5和值列表相同的东西sha1(据我所知,sbt 支持的仅有的两个值)。
  • 我试图关闭 Coursier(只是一种预感)并且它的行为相同。

我已经尝试了调试日志级别,这是构建结束时的内容:

  [debug] Done packaging.
20:27:44
  [debug] CLIENT ERROR: Not Found url=https://<artifactory>/artifactory/maven-local/com/avast/ip-info_2.13/2.8.28/ip-info_2.13-2.8.28.pom
20:27:44
  [info]   published ip-info_2.13 to https://<artifactory>/artifactory/maven-local/com/avast/ip-info_2.13/2.8.28/ip-info_2.13-2.8.28.pom
20:27:44
  [debug] CLIENT ERROR: Not Found url=https://<artifactory>/artifactory/maven-local/com/avast/ip-info_2.13/2.8.28/ip-info_2.13-2.8.28.jar
20:27:44
  [info]   published ip-info_2.13 to https://<artifactory>/artifactory/maven-local/com/avast/ip-info_2.13/2.8.28/ip-info_2.13-2.8.28.jar
20:27:44
  [debug] CLIENT ERROR: Not Found url=https://<artifactory>/artifactory/maven-local/com/avast/ip-info_2.13/2.8.28/ip-info_2.13-2.8.28-sources.jar
20:27:44
  [info]   published ip-info_2.13 to https://<artifactory>/artifactory/maven-local/com/avast/ip-info_2.13/2.8.28/ip-info_2.13-2.8.28-sources.jar
20:27:44
  [success] Total time: 0 s, completed Jan 28, 2021, 7:27:44 PM
4

1 回答 1

2

我想我想通了。这里的问题是,而不是

例如,我们可以看到play-json在其存储库中没有checksums提及build.sbt,也没有在其他任何地方提及。然而,看看他们在 maven 上发布的工件,我看到了sha-1, 和md5artifacts。

浏览了一下,我发现了这个:

从直接 URL 浏览工件时如何显示校验和文件?

这让我觉得 JFrog 隐藏了它。那里的决议是:

只需在 $ARTIFACTORY_HOME/etc/artifactory.system.properties 文件中设置一个属性。

  1. 将以下属性添加到 artifactory.system.properties 文件并保存 lit:artifactory.ui.hideChecksums=false

  2. 重新启动 Artifactory 以使更改生效:

我必须承认我没有尝试过,但这可能是一个线索。

于 2021-01-29T06:39:35.430 回答