What is the preferred way to upload artifacts to Artifactory?

泄露秘密 提交于 2019-12-13 02:21:29

问题


I have a gradle project, and Artifactory as a repository.

I'm a bit confised from the docs, so I ask the experts here: What is the preferred way to upload artifacts to Artifactory? using gradle's uploadArchives, or Artifactory's artifactoryPublish?

Why the uploadArchives is not enough?

ref: upload artifact to artifactory using gradle


回答1:


uploadArchives would of course work but you will be missing out on one of the main reasons you got Artifactory in the first place.

Artifactory's Build Integration (either by standalone build tool or by a CI server running it) is a very powerful tool you should definitely use for tractability of build artifacts and dependencies, license management, release management, and advanced search capabilities which all rely on the build information published by the plugin.

Also you should consider using one of the CI plugins as they offer much much more.




回答2:


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.



来源:https://stackoverflow.com/questions/36403467/what-is-the-preferred-way-to-upload-artifacts-to-artifactory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!