gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 15:06:59 25 4
gpt4 key购买 nike

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

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

我错过了什么?

更多信息:

  • sbt 1.4.6
  • publishMavenStyle := true
  • publishTo := <internal Artifactory>
  • 我会说这是我公司的 Artifactory 特有的,因为 publishLocal运作良好。
  • publish / checksums返回与 checksums 相同的内容这是 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

最佳答案

我想我明白了。这里的问题是 ,而不是 .

例如,我们可以看到 play-json在其 build.sbt 中没有提到 checksums , 也不 anywhere else in their repository .然而,看着他们的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:

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

关于scala - 如何发布带有校验和(MD5、SHA1)的工件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65940936/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com