如何发布带有校验和(MD5、SHA1)的工件?

How do I publish artifacts with checksums (MD5, SHA1)?

我希望 sbt publish 发布带有一些校验和的 JAR,但我似乎无法实现。

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

我错过了什么?

更多信息:

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

  [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

我想我明白了。这里的问题是 , and not .

例如,我们可以看到 play-json has no checksums mentions in its build.sbt, nor anywhere else in their repository. Yet, looking at their published artifacts at maven,我看到 sha-1md5 个工件。

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

How to show the checksum files when browsing artifacts from the direct URL?

这让我觉得 JFrog 隐藏了它。分辨率为:

Simply set a property in the $ARTIFACTORY_HOME/etc/artifactory.system.properties file.

  1. Add the following property to the artifactory.system.properties file and save lit: artifactory.ui.hideChecksums=false

  2. Restart Artifactory for the change to take effect:

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