简体   繁体   English

从 Jenkins 上传到 Artifactory 时,Maven“校验和验证失败,预期为 xxx,但为 yyy”

[英]Maven “checksum validation failed, expected xxx but is yyy for” on upload from Jenkins to Artifactory

From time to time Jenkins builds with Maven have a checksum validation failure when uploading to Artifactory:有时,Jenkins 使用 Maven 构建在上传到 Artifactory 时会出现校验和验证失败:

[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ example-matcher ---
[INFO] Uploading: https://artifactory.example.com/artifactory/libs-release-local/com/example/test/examplematcher/example-matcher/183/example-matcher-183.pom
[INFO] Uploaded: https://artifactory.example.com/artifactory/libs-release-local/com/example/test/examplematcher/example-matcher/183/example-matcher-183.pom (10 KB at 4.2 KB/sec)
[INFO] Downloading: https://artifactory.example.com/artifactory/libs-release-local/com/example/test/examplematcher/example-matcher/maven-metadata.xml
[WARNING] Checksum validation failed, expected e57ff3c617c84b922d5806a0ba7a9477b274919b but is f64094cf27d28dce9a8fe3fce63dd9c4d113b22a for https://artifactory.example.com/artifactory/libs-release-local/com/example/test/examplematcher/example-matcher/maven-metadata.xml
[INFO] Downloaded: https://artifactory.example.com/artifactory/libs-release-local/com/example/test/examplematcher/example-matcher/maven-metadata.xml (3 KB at 8.3 KB/sec)
[INFO] Uploading: https://artifactory.example.com/artifactory/libs-release-local/com/example/test/examplematcher/example-matcher/maven-metadata.xml
[INFO] Uploaded: https://artifactory.example.com/artifactory/libs-release-local/com/example/test/examplematcher/example-matcher/maven-metadata.xml (3 KB at 6.2 KB/sec)

Any idea, why this is happening and how to stop it from happening?任何想法,为什么会发生这种情况以及如何阻止它发生?

I could be wrong, but I'm investigating the same kind of problem, and my reading suggests to me the the warning message is due not to Artifactory complaining about the uploaded file checksum, but rather due to Maven complaining about the downloaded maven-metadata.xml file checksum.我可能是错的,但我正在调查同样的问题,我的阅读向我表明警告消息不是由于 Artifactory 抱怨上传的文件校验和,而是由于 Maven 抱怨下载的 maven-metadata .xml 文件校验和。

[INFO] Downloading: https://artifactory.example.com/artifactory/libs-release-local/com/example/test/examplematcher/example-matcher/maven-metadata.xml
[WARNING] Checksum validation failed, expected e57ff3c617c84b922d5806a0ba7a9477b274919b but is f64094cf27d28dce9a8fe3fce63dd9c4d113b22a for https://artifactory.example.com/artifactory/libs-release-local/com/example/test/examplematcher/example-matcher/maven-metadata.xml

(If that's wrong, I'm happy to be corrected.) So I think that partly answers "why this is happening", but I haven't yet figured out "how to stop it from happening". (如果那是错误的,我很高兴得到纠正。)所以我认为这部分回答了“为什么会发生这种情况”,但我还没有想出“如何阻止它发生”。

This warning message is due to Artifactory's checksum validation feature.此警告消息是由于 Artifactory 的校验和验证功能所致。 When a file is deployed Artifactory, based on the "Checksum Policy" defined in the local repository, will verify the checksum that was sent from the client to Artifactory and if the checksum is not the same you will receive this warning.部署文件时,Artifactory 会根据本地存储库中定义的“校验和策略”验证从客户端发送到 Artifactory 的校验和,如果校验和不相同,您将收到此警告。

You can read more on the "Checksum Policy"here .您可以在此处阅读有关“校验和策略”的更多信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM