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

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

问题描述

我的项目现在从中央存储库获取工件.现在我创建了新的 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 有一个 智能代理功能 用于保持托管存储库同步,尽管我不知道这是否适用于 Maven Central
  • 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天全站免登陆