我有一个gradle项目,Artifactory作为存储库。
我在文档中有点混淆,所以我请问这里的专家:使用gradle's uploadArchives
或Artifactory&#39将工件上传到Artifactory的首选方法是什么? ; artifactoryPublish
?
为什么uploadArchives还不够?
答案 0 :(得分:5)
uploadArchives当然会有效,但你会错过一个主要的reasons,你首先得到了Artifactory。
Artifactory的构建集成(通过独立构建工具或运行它的CI服务器)是一个非常强大的工具,您绝对应该use来构建构件工件和依赖项,license management ,release management和高级search功能都依赖于插件发布的构建信息。
此外,您应该考虑使用其中一个CI plugins,因为它们提供了更多功能。
答案 1 :(得分:4)
The contract of gradles uploadArchives
is basically the one of a simple maven or ivy repository. By that I mean, that it basically pushes different kind of artifacts using http or https to artifactory in a very simple manner.
The benefit of the artifactory gradle plugin is, that it allows you to attach way more metadata to the artifacts you publish as it does not rely on the maven repo contract anymore. Furthermore it is quite clever in not uploading same artifacts multiple times by doing checksum comparison.