如何将工件从一个存储库移动到另一个存储库? [英] How to move artifacts from a repository to another repository?

查看:63
本文介绍了如何将工件从一个存储库移动到另一个存储库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目现在从中央存储库中获取工件.现在,我创建了新的Artifact存储库,并希望我的项目从中获取工件.如何将所有工件从以前的中央存储库下载到新创建的存储库?

My project now getting artifacts from the Central Repository. Now I created new Artifact repository and want my project getting artifacts from that. How can I download all artifacts from previous central repository to new created repository?

推荐答案

Maven存储库管理器Nexus,Artfactory和Archiva并非旨在镜像远程存储库的内容.它们可以缓存用户检索到的所有文件,从而提高了构建效率并使您免受网络中断的影响.

Maven repository managers Nexus, Artfactory, Archiva are not designed to mirror the content of remote repositories. They cache any files retrieved by users, and this improves build efficiency and insulates you against network outages.

就像任何缓存一样,挑战也是与时俱进的. Maven存储库管理器的所有工作是下载远程内容的增量索引,使用户可以搜索文件并查看新版本,而无需下载所有内容. (2011年,Maven Central估计为350GB,)

Like any cache the challenge is keeping up to date. What all the Maven repository managers do is download an incremental index of the remote content, enabling users to search for files and see new releases, without downloading everything. (In 2011 Maven Central was estimated at 350GB, source)

因此,总之,只需设置您的Maven存储库,将其指向该构建,Maven Central中的工件将自动下载.

So in conclusion, just setup you Maven repository, point your build at it and the artifacts from Maven Central will be downloaded automatically.

附加说明:

  • 值得一看的是您的存储库管理器的功能.它们可能具有其他非标准功能.例如,Nexus Professional具有
  • It's worth looking at the capabilities of your repository manager. They may have additional non-standard features. For example Nexus Professional has a smart proxy feature for keeping hosted repositories synced, although I don't know if this will work with Maven Central

这篇关于如何将工件从一个存储库移动到另一个存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆