从 Maven 为 Artifactory 在本地下载工件

Locally downloading arifacts from Maven for Artifactory

我目前正在研究如何为我的公司高效使用 Gradle 和 Artifactory。我能够构建一些相互依赖的小测试程序和 junit 进行测试。
我们想要实现的目标之一是让我们在本地服务器上使用带有 Artifactory 的第三方库(因此不是来自 Maven 的镜像)。这就是出现一些问题的地方:如果没有 hamcrest,junit 将无法运行。
所以我的问题是:

Is there a simple way to download an artefact from Maven along with it's dependencies in one go to avoid waste of time and frustration at build time?

答案是:您不需要。 Artifactory 有远程存储库的概念,它代理像 maven central 和 jcenter 这样的存储库,为您提供透明依赖(和传递依赖)解决方案。

这是一个项目的 a simple example,它具有 Gradle 与 Artifactory 一起工作的构建(使用 Artifactory Gradle 插件)。随意复制粘贴。